summary refs log tree commit diff stats
path: root/tests/cpp/t23306.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cpp/t23306.nim')
-rw-r--r--tests/cpp/t23306.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/cpp/t23306.nim b/tests/cpp/t23306.nim
new file mode 100644
index 000000000..ebb4edb8d
--- /dev/null
+++ b/tests/cpp/t23306.nim
@@ -0,0 +1,12 @@
+discard """
+targets: "cpp"
+"""
+
+type K = object
+  h: iterator(f: K): K
+
+iterator d(g: K): K {.closure.} =
+  defer:
+    discard
+
+discard K(h: d)
\ No newline at end of file