gcc/testsuite/gdc.test/fail_compilation/test15368.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/test15368.d(13): Error: cannot declare `auto` loop variable, omit `auto` to still get type inference |
| 5 | --- |
| 6 | */ |
| 7 | |
| 8 | // Issue 15368 - Improve error message for "auto" keyword inside "foreach" |
| 9 | // https://issues.dlang.org/show_bug.cgi?id=15368 |
| 10 | |
| 11 | void main() |
| 12 | { |
| 13 | foreach (auto e; foo) { } |
| 14 | } |