summary refs log tree commit diff stats
path: root/compiler/semmagic.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-15 00:22:08 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-15 00:22:14 +0200
commitdb56174a19c8bd35430324ddd7f4be6ca3295bd3 (patch)
tree162fd9614e4ceaa240e948eec5e8b17e1e5e6da7 /compiler/semmagic.nim
parent995727ffd0cef78231203523d7a3c36bb014b30d (diff)
downloadNim-db56174a19c8bd35430324ddd7f4be6ca3295bd3.tar.gz
fixes #3548
Diffstat (limited to 'compiler/semmagic.nim')
-rw-r--r--compiler/semmagic.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/semmagic.nim b/compiler/semmagic.nim
index 1945d87eb..451745884 100644
--- a/compiler/semmagic.nim
+++ b/compiler/semmagic.nim
@@ -42,7 +42,10 @@ proc semArrGet(c: PContext; n: PNode; flags: TExprFlags): PNode =
   result = semSubscript(c, result, flags)
   c.p.bracketExpr = oldBracketExpr
   if result.isNil:
-    localError(n.info, "could not resolve: " & $n)
+    let x = copyTree(n)
+    x.sons[0] = newIdentNode(getIdent"[]", n.info)
+    bracketNotFoundError(c, x)
+    #localError(n.info, "could not resolve: " & $n)
     result = n
 
 proc semArrPut(c: PContext; n: PNode; flags: TExprFlags): PNode =