summary refs log tree commit diff stats
path: root/compiler/transf.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2019-08-31 18:23:54 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-08-31 19:23:54 +0200
commit2b565aad89587114148052eabdd430b923c21394 (patch)
treee5c70c7a771caabfd2143705e8c33f0010ed296e /compiler/transf.nim
parent9ae0dd611f77c4cd7122e6ac77e0278c1bafbbd7 (diff)
downloadNim-2b565aad89587114148052eabdd430b923c21394.tar.gz
Support iterators returning lent T (#11938)
* lent iterators
* rebase tests
* update changelog
* fix comments, more tests
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r--compiler/transf.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 555583685..836a6154c 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -371,8 +371,7 @@ proc transformYield(c: PTransf, n: PNode): PTransNode =
   # c.transCon.forStmt.len == 3 means that there is one for loop variable
   # and thus no tuple unpacking:
   if e.typ.isNil: return result # can happen in nimsuggest for unknown reasons
-  if skipTypes(e.typ, {tyGenericInst, tyAlias, tySink}).kind == tyTuple and
-      c.transCon.forStmt.len != 3:
+  if c.transCon.forStmt.len != 3:
     e = skipConv(e)
     if e.kind in {nkPar, nkTupleConstr}:
       for i in 0 ..< sonsLen(e):