summary refs log tree commit diff stats
path: root/tests/iter/titerautoerr3.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/iter/titerautoerr3.nim')
-rw-r--r--tests/iter/titerautoerr3.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/iter/titerautoerr3.nim b/tests/iter/titerautoerr3.nim
new file mode 100644
index 000000000..e47b65540
--- /dev/null
+++ b/tests/iter/titerautoerr3.nim
@@ -0,0 +1,9 @@
+discard """
+  errormsg: "cannot infer the return type of 'bar'"
+  line: 6
+"""
+
+iterator bar(): auto =
+  discard
+for t in bar():
+  discard