summary refs log blame commit diff stats
path: root/tests/casestmt/tcaseoverlaprange2.nim
blob: 4a1cb3ea622f9e8c08f2612abed015b63602e86f (plain) (tree)
1
2
3
4
5
6
7
8
9
           
                                  
          




   
                                          








                                  
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)