diff options
author | Araq <rumpf_a@web.de> | 2019-05-15 12:24:54 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-05-15 12:25:31 +0200 |
commit | 7fb256bdedc6bc09e1d2db670609707753b5a3cd (patch) | |
tree | 812ca011ab9a2954e9ee9bb993316707906abc32 /compiler | |
parent | 5e68d8f9e9f0a0298b7c3d467c7586888c6ff057 (diff) | |
download | Nim-7fb256bdedc6bc09e1d2db670609707753b5a3cd.tar.gz |
fixes #8053
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sempass2.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 557e5d3f7..217482d95 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -977,7 +977,8 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) = initEffects(g, effects, s, t, c) track(t, body) 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}: var res = s.ast.sons[resultPos].sym # get result symbol if res.id notin t.init: |