mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Currently running `nimsuggest`/`check` on this code causes the compiler
to raise an exception
```nim
type
Test = enum
A = 9.0
```
```
assertions.nim(34) raiseAssert
Error: unhandled exception: int128.nim(69, 11) `arg.sdata(3) == 0` out of range [AssertionDefect]
```
Issue was the compiler still trying to get the ordinal value even if it
wasn't an ordinal
9 lines
130 B
Nim
9 lines
130 B
Nim
discard """
|
|
cmd: "nim check $file"
|
|
"""
|
|
|
|
type
|
|
Test = enum
|
|
A = 9.0 #[tt.Error
|
|
^ ordinal type expected; given: float]#
|