diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 291e025058..81799e7624 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1489,6 +1489,9 @@ proc semYieldVarResult(c: PContext, n: PNode, restype: PType) = var t = skipTypes(restype, {tyGenericInst, tyAlias}) case t.kind of tyVar: + if n.sons[0].kind in {nkHiddenStdConv, nkHiddenSubConv}: + n.sons[0] = n.sons[0].sons[1] + n.sons[0] = takeImplicitAddr(c, n.sons[0]) of tyTuple: for i in 0..