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
Using a default value can silently override a generic type:
type Gen[T] = object a: T = 1.0 Spec32 = Gen[float32] Spec64 = Gen[float64] var a: Spec32 b: Spec64 echo(sizeof a, " vs ", sizeof b)
Nim Compiler Version 2.0.4 [Linux: amd64]
8 vs 8
4 vs 8
No response
The text was updated successfully, but these errors were encountered:
fixes #23594; Default object values silently override generic types
1bf2e38
ringabout
Successfully merging a pull request may close this issue.
Description
Using a default value can silently override a generic type:
Nim Version
Nim Compiler Version 2.0.4 [Linux: amd64]
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: