prevent yet another compiler crash from happening
This commit is contained in:
parent
55a5dcf8a4
commit
12f7b96be0
1 changed files with 2 additions and 1 deletions
|
|
@ -257,7 +257,8 @@ proc semArrayIndex(c: PContext, n: PNode): PType =
|
||||||
if e.sym.ast != nil:
|
if e.sym.ast != nil:
|
||||||
return semArrayIndex(c, e.sym.ast)
|
return semArrayIndex(c, e.sym.ast)
|
||||||
if not isOrdinalType(e.typ.lastSon):
|
if not isOrdinalType(e.typ.lastSon):
|
||||||
localError(n[1].info, errOrdinalTypeExpected)
|
let info = if n.safeLen > 1: n[1].info else: n.info
|
||||||
|
localError(info, errOrdinalTypeExpected)
|
||||||
result = makeRangeWithStaticExpr(c, e)
|
result = makeRangeWithStaticExpr(c, e)
|
||||||
if c.inGenericContext > 0: result.flags.incl tfUnresolved
|
if c.inGenericContext > 0: result.flags.incl tfUnresolved
|
||||||
elif e.kind in nkCallKinds and hasGenericArguments(e):
|
elif e.kind in nkCallKinds and hasGenericArguments(e):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue