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




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

echo checkDuplicates(0x7B)