bugfix: wrong error: not all cases covered with enums with holes
This commit is contained in:
parent
fe4cc78294
commit
7dff3e64bb
3 changed files with 25 additions and 3 deletions
16
tests/accept/compile/tenum2.nim
Executable file
16
tests/accept/compile/tenum2.nim
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
# Test that enum with holes is handled correctly by case statement
|
||||
|
||||
type
|
||||
TEnumHole = enum
|
||||
eA = 0,
|
||||
eB = 4,
|
||||
eC = 5
|
||||
|
||||
var
|
||||
e: TEnumHole = eB
|
||||
|
||||
case e
|
||||
of eA: echo "A"
|
||||
of eB: echo "B"
|
||||
of eC: echo "C"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue