summary refs log tree commit diff stats
path: root/tests/iter/titerautoerr1.nim
diff options
context:
space:
mode:
authorJasper Jenkins <jasper.vs.jenkins@gmail.com>2019-05-13 11:50:21 -0700
committerAndreas Rumpf <rumpf_a@web.de>2019-05-13 20:50:21 +0200
commit6fc74cec55b75291ad8e3f7735f8d2134505321a (patch)
treefe76a45da968cfffa4a275a7ecc059fc09e8d29b /tests/iter/titerautoerr1.nim
parentfb1c3a95a5288bd3bd3986a3f5055e979f4a5106 (diff)
downloadNim-6fc74cec55b75291ad8e3f7735f8d2134505321a.tar.gz
Iterator fixes (#11234)
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