bugfix: case exhaustiveness checking

This commit is contained in:
Araq 2013-03-21 08:09:14 +01:00
commit 02b1503e1f
5 changed files with 27 additions and 6 deletions

View file

@ -0,0 +1,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)