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

@ -267,14 +267,6 @@ proc transformLoopBody(c: PTransf, n: PNode): PTransNode =
discard c.blockSyms.pop()
else:
result = transform(c, n)
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 newTupleAccess(tup: PNode, i: int): PNode =
result = newNodeIT(nkBracketExpr, tup.info, tup.typ.sons[i])