summary refs log tree commit diff stats
path: root/compiler/plugins/itersgen.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/plugins/itersgen.nim')
-rw-r--r--compiler/plugins/itersgen.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/plugins/itersgen.nim b/compiler/plugins/itersgen.nim
index 78c79bf59..24e26b2b7 100644
--- a/compiler/plugins/itersgen.nim
+++ b/compiler/plugins/itersgen.nim
@@ -9,7 +9,7 @@
 
 ## Plugin to transform an inline iterator into a data structure.
 
-import ".." / [ast, lookups, semdata, lambdalifting, msgs]
+import ".." / [ast, modulegraphs, lookups, semdata, lambdalifting, msgs]
 
 proc iterToProcImpl*(c: PContext, n: PNode): PNode =
   result = newNodeI(nkStmtList, n.info)
@@ -29,7 +29,7 @@ proc iterToProcImpl*(c: PContext, n: PNode): PNode =
     localError(c.config, n[2].info,
         "type must be a non-generic ref|ptr to object with state field")
     return
-  let body = liftIterToProc(c.graph, iter.sym, iter.sym.getBody, t, c.idgen)
+  let body = liftIterToProc(c.graph, iter.sym, getBody(c.graph, iter.sym), t, c.idgen)
 
   let prc = newSym(skProc, n[3].ident, nextSymId c.idgen, iter.sym.owner, iter.sym.info)
   prc.typ = copyType(iter.sym.typ, nextTypeId c.idgen, prc)