fixes mitems iterator on vm. (issue with tuple value)
this discard any implicit conversion on iterator return value. the previous behaviour was to return a reference to a converted copy and thus not modifying the original value.
This commit is contained in:
parent
7ad115f530
commit
03b11b66cf
1 changed files with 3 additions and 0 deletions
|
|
@ -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.. <t.sonsLen:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue