[feature] cleanup PR, refs #11424
This commit is contained in:
parent
296c48de5e
commit
f67be92512
1 changed files with 6 additions and 5 deletions
|
|
@ -541,11 +541,12 @@ proc semArrayConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||||
if not isOrdinalType(idx.typ):
|
if not isOrdinalType(idx.typ):
|
||||||
localError(c.config, idx.info, "expected ordinal value for array " &
|
localError(c.config, idx.info, "expected ordinal value for array " &
|
||||||
"index, got '$1'" % renderTree(idx))
|
"index, got '$1'" % renderTree(idx))
|
||||||
firstIndex = getOrdValue(idx)
|
else:
|
||||||
lastIndex = firstIndex
|
firstIndex = getOrdValue(idx)
|
||||||
indexType = idx.typ
|
lastIndex = firstIndex
|
||||||
lastValidIndex = lastOrd(c.config, indexType)
|
indexType = idx.typ
|
||||||
x = x.sons[1]
|
lastValidIndex = lastOrd(c.config, indexType)
|
||||||
|
x = x.sons[1]
|
||||||
|
|
||||||
let yy = semExprWithType(c, x)
|
let yy = semExprWithType(c, x)
|
||||||
var typ = yy.typ
|
var typ = yy.typ
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue