We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
proc foo[T](a: T; b: T) = echo T foo(0.0'f32, 0.0) proc bar[T](a: T; b: T = 0.0) = echo T bar(0.0'f32)
float32 float64
This is very strage, because the type T should depend on the first argument a, which is definitively float32.
T
a
float32
float32 float32
T(0.0)
The text was updated successfully, but these errors were encountered:
fix nim-lang#12525; workaround nim-lang#12528
8264352
fixes #12528 [backport]
10f682d
e58c2d2
[backport] fix #12528, fix #12525: incorrect generic type resolution …
6887d6d
…for default values (#12538) (cherry picked from commit e58c2d2)
[backport] fix nim-lang#12528, fix nim-lang#12525: incorrect generic …
bc8b0b8
…type resolution for default values (nim-lang#12538)
No branches or pull requests
Example
Current Output
This is very strage, because the type
T
should depend on the first argumenta
, which is definitivelyfloat32
.Expected Output
Additional Information
T(0.0)
in the default argument causes a compiler crash.The text was updated successfully, but these errors were encountered: