Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice13459.d(12): Error: undefined identifier `B`
5 fail_compilation/ice13459.d(18): Error: none of the overloads of `opSlice` are callable using argument types `(int, int)`
6 fail_compilation/ice13459.d(11): Candidate is: `ice13459.A.opSlice() const`
7 ---
8 */
9 struct A
10 {
11 auto opSlice() const {}
12 auto opSlice() { return B; }
13 }
14
15 void main()
16 {
17 auto df = A();
18 foreach (fi; df[0..0]) {}
19 }