summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-08 20:18:33 +0200
committerAraq <rumpf_a@web.de>2013-04-08 20:18:33 +0200
commit908383e4cab979dcc3ee7a1c1710dd5314984065 (patch)
tree807af8548365ee70ac6d2221ec5ebb5a01571b43 /compiler/semexprs.nim
parentdc65ccde011023beab4e3405cb54d6229ed7082e (diff)
downloadNim-908383e4cab979dcc3ee7a1c1710dd5314984065.tar.gz
fixes #321
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 962272ec4..bf07f843e 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -996,7 +996,8 @@ proc semSubscript(c: PContext, n: PNode, flags: TExprFlags): PNode =
     checkSonsLen(n, 2)
     n.sons[0] = makeDeref(n.sons[0])
     for i in countup(1, sonsLen(n) - 1): 
-      n.sons[i] = semExprWithType(c, n.sons[i], flags)
+      n.sons[i] = semExprWithType(c, n.sons[i], 
+                                  flags*{efInTypeof, efDetermineType})
     var indexType = if arr.kind == tyArray: arr.sons[0] else: getSysType(tyInt)
     var arg = IndexTypesMatch(c, indexType, n.sons[1].typ, n.sons[1])
     if arg != nil: