fixes #1547
This commit is contained in:
parent
c1930f1b6e
commit
7edf6fc1d2
3 changed files with 20 additions and 2 deletions
|
|
@ -117,7 +117,9 @@ proc isDeepConstExpr*(n: PNode): bool =
|
|||
of nkCurly, nkBracket, nkPar, nkObjConstr, nkClosure:
|
||||
for i in 0 .. <n.len:
|
||||
if not isDeepConstExpr(n.sons[i]): return false
|
||||
result = true
|
||||
# XXX once constant objects are supported by the codegen this needs to be
|
||||
# weakened:
|
||||
result = n.typ.isNil or n.typ.skipTypes({tyGenericInst, tyDistinct}).kind != tyObject
|
||||
else: discard
|
||||
|
||||
proc flattenTreeAux(d, a: PNode, op: TMagic) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue