d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag16499.d
blob63b4b3c5279509b57f3ae68e1b48f39c6544bca2
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag16499.d(22): Error: incompatible types for `(2) in (foo)`: `int` and `A`
5 fail_compilation/diag16499.d(24): Error: incompatible types for `(1.0) in (bar)`: `double` and `B`
6 ---
7 */
9 struct A {}
10 struct B {
11 void* opBinaryRight(string op)(int b) if (op == "in")
13 return null;
17 void main()
19 A foo;
20 B bar;
22 2 in foo;
23 2 in bar; // OK
24 1.0 in bar;