You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I mentioned in the realtime chat this is not due to the bool, it seems to be a dot operators with type mismatch bug.
This code shouldnt compile either, since you're passing an int as a bool and Nim doesnt implictly convert.
You can do the following and it'll work fine for you.
jtiai
changed the title
Template with boolean value causes unhandled exception
Dot operators with type mismatch, shows assertion instead of compiler error
Apr 22, 2021
The following code doesn't compile and causes unhandled exception:
Example
Current Output
Expected Output
Compiler provides meanful error message or compiles.
Possible Solution
If
flags.A = 123
is written asflags.A = bool(123)
code compiles as expected.The text was updated successfully, but these errors were encountered: