tcaseoverlaprange2.nim 249 B

12345678910111213141516171819
  1. discard """
  2. errormsg: "duplicate case label"
  3. line: 13
  4. """
  5. proc checkDuplicates(myval: int32): bool =
  6. case myval
  7. of 0x7B:
  8. echo "this should not compile"
  9. of 0x78 .. 0x7D:
  10. result = true
  11. else:
  12. nil
  13. echo checkDuplicates(0x7B)