mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
24 lines
309 B
D
24 lines
309 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail7173.d(23): Error: expression `b1._a.opBinary(b2._a).fun()` is `void` and has no value
|
|
---
|
|
*/
|
|
struct A{
|
|
|
|
A opBinary(string op)(A a){ A rt; return rt; }
|
|
|
|
void fun(){ }
|
|
}
|
|
|
|
struct B{
|
|
|
|
A _a;
|
|
alias _a this;
|
|
}
|
|
|
|
|
|
void main(){
|
|
|
|
B b1, b2, b3; b3 = (b1 - b2).fun();
|
|
}
|