-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #14254 #21837
fix #14254 #21837
Conversation
Package failure is because proc T(x: int): float = x.float
proc foo[T](x: int) =
echo x.T
foo[uint](123) # 123.0 now behaves like proc T(x: int): float = x.float
block:
type T = uint
proc foo(x: int) =
echo x.T
foo(123) # 123 which to me seems like the more consistent behavior. We either patch the package (to use a different name for the generic param) or we don't fix this bug I think. |
Ok yep, this is an inconsistency proc T(x: int): float = x.float
proc foo[T](x: int) =
echo typeof T(x) # uint
echo typeof x.T # float
foo[uint](123) Made a PR to the package: andreaferretti/neo#53 |
Feel free to fork the package and delegate "important_packages" to the fork or to disable the package for testing so that we can move on with this bugfix. It's pretty nice to have for v2.0. |
Done, CI failure unrelated |
Thanks for your hard work on this PR! Hint: mm: orc; opt: speed; options: -d:release |
* fix nim-lang#14254 * use temporary PR branch for neo * fix url
fixes #14254
Not super clean but can't think of a better solution