Nim
Nim copied to clipboard
Invalid `pred` in `when` swallowed
Nim Version
2.2.4
Description
type X = enum
a
b
when pred(a) == b:
echo "a"
else:
echo "b"
pred(a) is not well-defined - this should fail to compile
Current Output
Compiles
Expected Output
Compile-time error
Known Workarounds
No response
Additional Information
No response
It seems that an extra VM opcode needs to be introduced for rangecheck