Bugfix: the size of an array may be a static tuple element
This commit is contained in:
parent
509d6e9232
commit
ab9969ed3b
2 changed files with 35 additions and 8 deletions
|
|
@ -301,7 +301,8 @@ proc semArrayIndex(c: PContext, n: PNode): PType =
|
|||
localError(c.config, info, errOrdinalTypeExpected)
|
||||
result = makeRangeWithStaticExpr(c, e)
|
||||
if c.inGenericContext > 0: result.flags.incl tfUnresolved
|
||||
elif e.kind in nkCallKinds and hasGenericArguments(e):
|
||||
elif e.kind in (nkCallKinds + {nkBracketExpr}) and
|
||||
hasGenericArguments(e):
|
||||
if not isOrdinalType(e.typ):
|
||||
localError(c.config, n[1].info, errOrdinalTypeExpected)
|
||||
# This is an int returning call, depending on an
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue