summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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"
+