mitigates unclear nimsuggest problem

This commit is contained in:
Araq
2015-10-22 10:24:19 +02:00
parent 3d512a73e6
commit 3f24a7ff3e

View File

@@ -304,6 +304,7 @@ proc transformYield(c: PTransf, n: PNode): PTransNode =
var e = n.sons[0]
# 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}).kind == tyTuple and
c.transCon.forStmt.len != 3:
e = skipConv(e)