Debian Codegraph @

gcc/testsuite/gdc.test/compilable/b20067.d

raw
1 struct S1
2 {
3 int i;
4 @property int ii(){return 0;}
5 @property bool b(){return true;}
6 alias empty = b;
7 alias front = ii;
8 void popFront(){}
9 }
10 struct S2
11 {
12 int i;
13 bool b;
14 alias empty = b;
15 alias front = i;
16 void popFront(){}
17 }
18
19 void main()
20 {
21 foreach(n; S1()) { } // 2.086: Error: cannot infer argument types
22 foreach(n; S2()) { } // 2.086: Error: cannot infer argument types
23 }