summary refs log tree commit diff stats
path: root/tests/casestmt/t7699.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/casestmt/t7699.nim')
-rw-r--r--tests/casestmt/t7699.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/casestmt/t7699.nim b/tests/casestmt/t7699.nim
new file mode 100644
index 000000000..1354551c1
--- /dev/null
+++ b/tests/casestmt/t7699.nim
@@ -0,0 +1,15 @@
+discard """
+  errormsg: "case statement cannot work on enums with holes for computed goto"
+  line: 13
+"""
+
+type
+  X = enum
+    A = 0, B = 100
+
+var z = A
+while true:
+  {.computedGoto.}
+  case z
+  of A: discard
+  of B: discard