fix tisop
Adding nil checks on the exit paths for semCompiles errors. This was probably not needed before, because semIndirectOp had a special detection for semCompiles contexts. We could try to restore these, but wouldn't this just postpone the crashes until someone tries the same expressions in nimrod check? One of the previous commits also used errorNode to avoid returning nil. This may be an alaternative approach.
This commit is contained in:
parent
9cc23118be
commit
52b00630c8
1 changed files with 2 additions and 2 deletions
|
|
@ -766,7 +766,7 @@ proc semDirectOp(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||||
let nOrig = n.copyTree
|
let nOrig = n.copyTree
|
||||||
#semLazyOpAux(c, n)
|
#semLazyOpAux(c, n)
|
||||||
result = semOverloadedCallAnalyseEffects(c, n, nOrig, flags)
|
result = semOverloadedCallAnalyseEffects(c, n, nOrig, flags)
|
||||||
result = afterCallActions(c, result, nOrig, flags)
|
if result != nil: result = afterCallActions(c, result, nOrig, flags)
|
||||||
|
|
||||||
proc buildStringify(c: PContext, arg: PNode): PNode =
|
proc buildStringify(c: PContext, arg: PNode): PNode =
|
||||||
if arg.typ != nil and
|
if arg.typ != nil and
|
||||||
|
|
@ -1994,4 +1994,4 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
||||||
else:
|
else:
|
||||||
LocalError(n.info, errInvalidExpressionX,
|
LocalError(n.info, errInvalidExpressionX,
|
||||||
renderTree(n, {renderNoComments}))
|
renderTree(n, {renderNoComments}))
|
||||||
incl(result.flags, nfSem)
|
if result != nil: incl(result.flags, nfSem)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue