bugfix: readline wrapper; bugfix: evaluation of type conversions

This commit is contained in:
Araq 2011-02-14 21:20:35 +01:00
commit 5c7e3efbc3
10 changed files with 57 additions and 40 deletions

View file

@ -462,9 +462,13 @@ proc evalAddr(c: PEvalContext, n: PNode, flags: TEvalFlags): PNode =
addSon(result, a)
proc evalConv(c: PEvalContext, n: PNode): PNode =
# hm, I cannot think of any conversions that need to be handled here...
result = evalAux(c, n.sons[1], {})
result.typ = n.typ
result = evalAux(c, n.sons[1], {efLValue})
if isSpecial(result): return
var a = result
result = foldConv(n, a)
if result == nil:
# foldConv() cannot deal with everything that we want to do here:
result = a
proc evalCheckedFieldAccess(c: PEvalContext, n: PNode,
flags: TEvalFlags): PNode =