d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail7173.d
blob05ba7f9fc0a4da496a05482addacfc24e80853bb
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail7173.d(23): Error: expression `b1._a.opBinary(b2._a).fun()` is `void` and has no value
5 ---
6 */
7 struct A{
9 A opBinary(string op)(A a){ A rt; return rt; }
11 void fun(){ }
14 struct B{
16 A _a;
17 alias _a this;
21 void main(){
23 B b1, b2, b3; b3 = (b1 - b2).fun();