summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index bb5f6812b..6724a8100 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -979,7 +979,7 @@ proc genAddr(p: PProc, n: PNode, r: var TCompRes) =
     if ty.kind in MappedToObject:
       gen(p, n.sons[0], r)
     else:
-      let kindOfIndexedExpr = n.sons[0].sons[0].typ.kind
+      let kindOfIndexedExpr = skipTypes(n.sons[0].sons[0].typ, abstractVarRange).kind
       case kindOfIndexedExpr
       of tyArray, tyArrayConstr, tyOpenArray, tySequence, tyString, tyCString,
           tyVarargs: