[feature] cleanup PR, refs #11424

This commit is contained in:
Araq 2019-06-19 09:54:01 +02:00
commit f67be92512

View file

@ -541,6 +541,7 @@ 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))
else:
firstIndex = getOrdValue(idx) firstIndex = getOrdValue(idx)
lastIndex = firstIndex lastIndex = firstIndex
indexType = idx.typ indexType = idx.typ