From f14ca63417136a4d9fedb4ce776bdea958c9faef Mon Sep 17 00:00:00 2001 From: yglukhov Date: Fri, 12 Jun 2015 00:06:01 +0300 Subject: [PATCH] Singing and dancing with skipTypes. --- compiler/jsgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index bb5f6812b8..6724a81001 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: