This commit is contained in:
Araq 2013-09-11 00:00:11 +02:00
commit 596496f695

View file

@ -1022,7 +1022,7 @@ proc semSubscript(c: PContext, n: PNode, flags: TExprFlags): PNode =
case arr.kind case arr.kind
of tyArray, tyOpenArray, tyVarargs, tyArrayConstr, tySequence, tyString, of tyArray, tyOpenArray, tyVarargs, tyArrayConstr, tySequence, tyString,
tyCString: tyCString:
checkSonsLen(n, 2) if n.len != 2: return nil
n.sons[0] = makeDeref(n.sons[0]) n.sons[0] = makeDeref(n.sons[0])
for i in countup(1, sonsLen(n) - 1): for i in countup(1, sonsLen(n) - 1):
n.sons[i] = semExprWithType(c, n.sons[i], n.sons[i] = semExprWithType(c, n.sons[i],