diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 2 | ||||
-rw-r--r-- | compiler/semmagic.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 633a0cc26..8cdd16f02 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1886,7 +1886,7 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode = result.add(n[1]) if mode == noOverloadedSubscript: bracketNotFoundError(c, result) - return n + return errorNode(c, n) else: result = semExprNoType(c, result) return result diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim index cb5e76e8c..b5990161e 100644 --- a/compiler/semmagic.nim +++ b/compiler/semmagic.nim @@ -66,7 +66,7 @@ proc semArrGet(c: PContext; n: PNode; flags: TExprFlags): PNode = x[0] = newIdentNode(getIdent(c.cache, "[]"), n.info) bracketNotFoundError(c, x) #localError(c.config, n.info, "could not resolve: " & $n) - result = n + result = errorNode(c, n) proc semArrPut(c: PContext; n: PNode; flags: TExprFlags): PNode = # rewrite `[]=`(a, i, x) back to ``a[i] = x``. |