refactor illegal iterator assignment detection (#12212)
* refactor illegal iterator assignment detection * delete crappy test
This commit is contained in:
parent
245a954b25
commit
7cf3395d85
9 changed files with 54 additions and 54 deletions
|
|
@ -636,7 +636,7 @@ proc reverseDestroys(destroys: seq[PNode]): seq[PNode] =
|
|||
result.add destroys[i]
|
||||
|
||||
proc injectDestructorCalls*(g: ModuleGraph; owner: PSym; n: PNode): PNode =
|
||||
if sfGeneratedOp in owner.flags or isInlineIterator(owner): return n
|
||||
if sfGeneratedOp in owner.flags or (owner.kind == skIterator and isInlineIterator(owner.typ)): return n
|
||||
var c: Con
|
||||
c.owner = owner
|
||||
c.destroys = newNodeI(nkStmtList, n.info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue