mitigates unclear nimsuggest problem
This commit is contained in:
parent
3d512a73e6
commit
3f24a7ff3e
1 changed files with 1 additions and 0 deletions
|
|
@ -304,6 +304,7 @@ proc transformYield(c: PTransf, n: PNode): PTransNode =
|
||||||
var e = n.sons[0]
|
var e = n.sons[0]
|
||||||
# c.transCon.forStmt.len == 3 means that there is one for loop variable
|
# c.transCon.forStmt.len == 3 means that there is one for loop variable
|
||||||
# and thus no tuple unpacking:
|
# 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
|
if skipTypes(e.typ, {tyGenericInst}).kind == tyTuple and
|
||||||
c.transCon.forStmt.len != 3:
|
c.transCon.forStmt.len != 3:
|
||||||
e = skipConv(e)
|
e = skipConv(e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue