Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail352.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail352.d(18): Error: cannot infer argument types, expected 1 argument, not 2
5 ---
6 */
7
8 struct Range
9 {
10 bool empty;
11 int front() { return 0; }
12 void popFront() { empty = true; }
13 }
14
15 void main()
16 {
17 // no index for range foreach
18 foreach(i, v; Range()) {}
19 }