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