fixes #287; bugfix: subrange checking is performed again

This commit is contained in:
Araq 2013-04-12 16:24:58 +02:00
commit 3cb3813eed
14 changed files with 147 additions and 32 deletions

View file

@ -166,10 +166,10 @@ proc semCase(c: PContext, n: PNode): PNode =
proc fitRemoveHiddenConv(c: PContext, typ: Ptype, n: PNode): PNode =
result = fitNode(c, typ, n)
if result.kind in {nkHiddenStdConv, nkHiddenSubConv}:
changeType(result.sons[1], typ)
changeType(result.sons[1], typ, check=true)
result = result.sons[1]
elif not sameType(result.typ, typ):
changeType(result, typ)
elif not sameType(result.typ, typ):
changeType(result, typ, check=false)
proc findShadowedVar(c: PContext, v: PSym): PSym =
for i in countdown(c.tab.tos - 2, ModuleTablePos+1):