summary refs log tree commit diff stats
path: root/tests/casestmt/tcaseoverlaprange2.nim
blob: 4a1cb3ea622f9e8c08f2612abed015b63602e86f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  errormsg: "duplicate case label"
  line: 13
"""




proc checkDuplicates(myval: int32): bool =
  case myval
  of 0x7B:
    echo "this should not compile"
  of 0x78 .. 0x7D:
    result = true
  else:
    nil

echo checkDuplicates(0x7B)