parent
fb58066b61
commit
f8c48fc186
2 changed files with 19 additions and 2 deletions
|
|
@ -699,8 +699,9 @@ proc p(n: PNode; c: var Con; s: var Scope; mode: ProcessMode): PNode =
|
|||
elif n.kind in {nkObjDownConv, nkObjUpConv}:
|
||||
result = copyTree(n)
|
||||
result[0] = p(n[0], c, s, sinkArg)
|
||||
elif n.typ == nil:
|
||||
# 'raise X' can be part of a 'case' expression. Deal with it here:
|
||||
elif n.typ == nil or n.typ.skipTypes({tyGenericInst, tyAlias, tySink, tyVar}).kind == tyOpenArray:
|
||||
# 'raise X' can be part of a 'case' expression. Deal with it here.
|
||||
# openarrays require perfect forwarding
|
||||
result = p(n, c, s, normal)
|
||||
else:
|
||||
# copy objects that are not temporary but passed to a 'sink' parameter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue