bugfix: case exhaustiveness checking
This commit is contained in:
parent
b7d1901747
commit
02b1503e1f
5 changed files with 27 additions and 6 deletions
|
|
@ -44,9 +44,9 @@ proc inSet(s: PNode, elem: PNode): bool =
|
|||
return true
|
||||
result = false
|
||||
|
||||
proc overlap(a, b: PNode): bool =
|
||||
if a.kind == nkRange:
|
||||
if b.kind == nkRange:
|
||||
proc overlap(a, b: PNode): bool =
|
||||
if a.kind == nkRange:
|
||||
if b.kind == nkRange:
|
||||
# X..Y and C..D overlap iff (X <= D and C <= Y)
|
||||
result = leValue(a.sons[0], b.sons[1]) and
|
||||
leValue(b.sons[0], a.sons[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue