mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
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:
committed by
Andreas Rumpf
parent
7ad115f530
commit
03b11b66cf
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user