fixes #2113
This commit is contained in:
parent
6eb8867f1a
commit
4876aabb39
1 changed files with 3 additions and 1 deletions
|
|
@ -686,7 +686,9 @@ proc evalAtCompileTime(c: PContext, n: PNode): PNode =
|
|||
# implicit statics.
|
||||
if n.len > 1:
|
||||
for i in 1 .. <n.len:
|
||||
if n[i].typ.kind != tyStatic or tfUnresolved notin n[i].typ.flags:
|
||||
# see bug #2113, it's possible that n[i].typ for errornous code:
|
||||
if n[i].typ.isNil or n[i].typ.kind != tyStatic or
|
||||
tfUnresolved notin n[i].typ.flags:
|
||||
break maybeLabelAsStatic
|
||||
n.typ = newTypeWithSons(c, tyStatic, @[n.typ])
|
||||
n.typ.flags.incl tfUnresolved
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue