diff options
Diffstat (limited to 'compiler/semfold.nim')
-rw-r--r-- | compiler/semfold.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim index 42fa60781..0f1138e04 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -538,7 +538,8 @@ proc getArrayConstr(m: PSym, n: PNode): PNode = proc foldArrayAccess(m: PSym, n: PNode): PNode = var x = getConstExpr(m, n.sons[0]) - if x == nil or x.typ.skipTypes({tyGenericInst}).kind == tyTypeDesc: return + if x == nil or x.typ.skipTypes({tyGenericInst, tyAlias}).kind == tyTypeDesc: + return var y = getConstExpr(m, n.sons[1]) if y == nil: return |