bugfix: wrong error: not all cases covered with enums with holes

This commit is contained in:
Andreas Rumpf
2010-03-09 21:36:11 +01:00
parent fe4cc78294
commit 7dff3e64bb
3 changed files with 25 additions and 3 deletions

16
tests/accept/compile/tenum2.nim Executable file
View 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"