summary refs log tree commit diff stats
path: root/tests/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib')
-rw-r--r--tests/stdlib/thashes.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stdlib/thashes.nim b/tests/stdlib/thashes.nim
index 9c9287784..b8a2c2c6a 100644
--- a/tests/stdlib/thashes.nim
+++ b/tests/stdlib/thashes.nim
@@ -4,6 +4,15 @@ discard """
 
 import std/hashes
 
+
+when not defined(js) and not defined(cpp):
+  block:
+    var x = 12
+    iterator hello(): int {.closure.} =
+      yield x
+
+    discard hash(hello)
+
 block hashes:
   block hashing:
     var dummy = 0.0