fixes #8053
This commit is contained in:
parent
5e68d8f9e9
commit
7fb256bded
1 changed files with 2 additions and 1 deletions
|
|
@ -977,7 +977,8 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) =
|
||||||
initEffects(g, effects, s, t, c)
|
initEffects(g, effects, s, t, c)
|
||||||
track(t, body)
|
track(t, body)
|
||||||
if not isEmptyType(s.typ.sons[0]) and
|
if not isEmptyType(s.typ.sons[0]) and
|
||||||
{tfNeedsInit, tfNotNil} * s.typ.sons[0].flags != {} and
|
({tfNeedsInit, tfNotNil} * s.typ.sons[0].flags != {} or
|
||||||
|
s.typ.sons[0].skipTypes(abstractInst).kind == tyVar) and
|
||||||
s.kind in {skProc, skFunc, skConverter, skMethod}:
|
s.kind in {skProc, skFunc, skConverter, skMethod}:
|
||||||
var res = s.ast.sons[resultPos].sym # get result symbol
|
var res = s.ast.sons[resultPos].sym # get result symbol
|
||||||
if res.id notin t.init:
|
if res.id notin t.init:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue