fixes most recent iterators-as-expressions regression
This commit is contained in:
parent
ef19634065
commit
33b0e73962
1 changed files with 2 additions and 2 deletions
|
|
@ -1637,7 +1637,7 @@ proc semIterator(c: PContext, n: PNode): PNode =
|
||||||
# bug #7093: if after a macro transformation we don't have an
|
# bug #7093: if after a macro transformation we don't have an
|
||||||
# nkIteratorDef aynmore, return. The iterator then might have been
|
# nkIteratorDef aynmore, return. The iterator then might have been
|
||||||
# sem'checked already. (Or not, if the macro skips it.)
|
# sem'checked already. (Or not, if the macro skips it.)
|
||||||
if result.kind != nkIteratorDef: return
|
if result.kind != n.kind: return
|
||||||
var s = result.sons[namePos].sym
|
var s = result.sons[namePos].sym
|
||||||
var t = s.typ
|
var t = s.typ
|
||||||
if t.sons[0] == nil and s.typ.callConv != ccClosure:
|
if t.sons[0] == nil and s.typ.callConv != ccClosure:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue