summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/test18607.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/test18607.d')
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/test18607.d18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test18607.d b/gcc/testsuite/gdc.test/fail_compilation/test18607.d
new file mode 100644
index 00000000000..b3af393bdac
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/test18607.d
@@ -0,0 +1,18 @@
+/* TEST_OUTPUT:
+---
+fail_compilation/test18607.d(10): Error: function `test18607.test!int.test` no `return exp;` or `assert(0);` at end of function
+& test
+---
+*/
+
+// https://issues.dlang.org/show_bug.cgi?id=18607
+
+int* test(T...)() pure @safe {
+ L:foreach(_; T) {
+ continue L;
+ return null;
+ }
+}
+
+
+pragma(msg, &test!(int));