summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2010-03-09 21:36:11 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2010-03-09 21:36:11 +0100
commit7dff3e64bbb44cfc57314038c2c047f2ccb1da1e (patch)
tree47ca722cbdc80347fb325283d03212d4bb4df2e9 /tests/accept/compile
parentfe4cc78294fc3eed5335690e155a78dc119e39a8 (diff)
downloadNim-7dff3e64bbb44cfc57314038c2c047f2ccb1da1e.tar.gz
bugfix: wrong error: not all cases covered with enums with holes
Diffstat (limited to 'tests/accept/compile')
-rwxr-xr-xtests/accept/compile/tenum2.nim16
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"
+