summary refs log tree commit diff stats
path: root/tests/iter/titerautoerr1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/iter/titerautoerr1.nim')
-rw-r--r--tests/iter/titerautoerr1.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/iter/titerautoerr1.nim b/tests/iter/titerautoerr1.nim
new file mode 100644
index 000000000..c7e5642c8
--- /dev/null
+++ b/tests/iter/titerautoerr1.nim
@@ -0,0 +1,8 @@
+discard """
+  errormsg: "type mismatch: got <int literal(1)> but expected 'string'"
+  line: 8
+"""
+
+iterator a(): auto {.closure.} =
+  if true: return "str"
+  yield 1