summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2021-01-02 10:11:46 -0600
committerGitHub <noreply@github.com>2021-01-02 17:11:46 +0100
commitb8775bff575fb6860d43806b8070b904229927bf (patch)
tree26704abe8a8a763127a072d8d05be7926f362128 /compiler
parentd8b1ffc85733a2189a91deafe00d67af690028de (diff)
downloadNim-b8775bff575fb6860d43806b8070b904229927bf.tar.gz
fix `is "closure"` (#16552)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 9eccdef45..1e5772189 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -408,8 +408,7 @@ proc isOpImpl(c: PContext, n: PNode, flags: TExprFlags): PNode =
     of "closure":
       let t = skipTypes(t1, abstractRange)
       res = t.kind == tyProc and
-            t.callConv == ccClosure and
-            tfIterator notin t.flags
+            t.callConv == ccClosure
     of "iterator":
       let t = skipTypes(t1, abstractRange)
       res = t.kind == tyProc and