summary refs log tree commit diff stats
path: root/tests/casestmt/t7699.nim
blob: 1354551c1d1bda89303ddbb96c738cd4a005a207 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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