summary refs log tree commit diff stats
path: root/tests/casestmt/tcaseoverlaprange2.nim
blob: d6e301508b4194c258dae76888422ba80acbd0f9 (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)