summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/vmgen.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 6a59b3384..73fcc5a27 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -1184,6 +1184,9 @@ proc checkCanEval(c: PCtx; n: PNode) =
   if s.kind in {skVar, skTemp, skLet, skParam, skResult} and
       not s.isOwnedBy(c.prc.sym) and s.owner != c.module:
     cannotEval(n)
+  elif s.kind in {skProc, skConverter, skMethod,
+                  skIterator, skClosureIterator} and sfForward in s.flags:
+    cannotEval(n)
 
 proc isTemp(c: PCtx; dest: TDest): bool =
   result = dest >= 0 and c.prc.slots[dest].kind >= slotTempUnknown