-
Notifications
You must be signed in to change notification settings - Fork 39
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
c code error type mismatch on generic objects with same T parameters but one has a T from FFI #1431
Comments
The underlying issue here is that imported integer-like types are treated inconsistent in the compiler:
Since The object construction assignment only works because Depending on how the rework of imported types goes, the example code will either be rejected by the NimSkull compiler, or compile and run successfully. |
Curious what you think, but should these be treated as equal? AFAIK, |
According to the current rules, yes, since type cint {.importc: "int", nodecl.} = int32
Regarding what
|
OK, in which case we're on the same page, in that the current definition is nonsense. Additionally, I'm onboard with your definition (opaque plus compiler query). |
Example
Actual Output
Expected Output
i think it should be a type mismatch error regarding using int16 or other implicit convertible types marks as type mismatch error
Possible Solution
without using a generic proc and use object initialization syntax instead it compiles
Additional Information
References
The text was updated successfully, but these errors were encountered: