diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-09 21:36:11 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-09 21:36:11 +0100 |
commit | 7dff3e64bbb44cfc57314038c2c047f2ccb1da1e (patch) | |
tree | 47ca722cbdc80347fb325283d03212d4bb4df2e9 /tests/accept/compile | |
parent | fe4cc78294fc3eed5335690e155a78dc119e39a8 (diff) | |
download | Nim-7dff3e64bbb44cfc57314038c2c047f2ccb1da1e.tar.gz |
bugfix: wrong error: not all cases covered with enums with holes
Diffstat (limited to 'tests/accept/compile')
-rwxr-xr-x | tests/accept/compile/tenum2.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/accept/compile/tenum2.nim b/tests/accept/compile/tenum2.nim new file mode 100755 index 000000000..feba36dd6 --- /dev/null +++ b/tests/accept/compile/tenum2.nim @@ -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" + |