diff options
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r-- | compiler/transf.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim index 92319ac19..3d78a6b92 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -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) |