dmd/compiler/test/compilable/b20067.d
2022-07-09 18:53:07 +02:00

23 lines
419 B
D

struct S1
{
int i;
@property int ii(){return 0;}
@property bool b(){return true;}
alias empty = b;
alias front = ii;
void popFront(){}
}
struct S2
{
int i;
bool b;
alias empty = b;
alias front = i;
void popFront(){}
}
void main()
{
foreach(n; S1()) { } // 2.086: Error: cannot infer argument types
foreach(n; S2()) { } // 2.086: Error: cannot infer argument types
}