attempt to fix a bug concerning implicit type conversions in case statements

This commit is contained in:
Araq 2012-03-27 00:48:59 +02:00
commit a79acb58fc
4 changed files with 26 additions and 29 deletions

View file

@ -146,6 +146,14 @@ proc IITablePut*(t: var TIITable, key, val: int)
# implementation
proc skipConv*(n: PNode): PNode =
case n.kind
of nkObjUpConv, nkObjDownConv, nkChckRange, nkChckRangeF, nkChckRange64:
result = n.sons[0]
of nkHiddenStdConv, nkHiddenSubConv, nkConv:
result = n.sons[1]
else: result = n
proc SameValue*(a, b: PNode): bool =
result = false
case a.kind