From 3f24a7ff3ea45253b496ab08c2bdecb838f0419d Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 22 Oct 2015 10:24:19 +0200 Subject: [PATCH] mitigates unclear nimsuggest problem --- compiler/transf.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/transf.nim b/compiler/transf.nim index 92319ac193..3d78a6b925 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)