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.00000) in (bar)): 'double' and 'B'
6 ---
7 */
8 
9 struct A {}
10 struct B {
11 	void* opBinaryRight(string op)(int b) if (op == "in")
12 	{
13 		return null;
14 	}
15 }
16 
main()17 void main()
18 {
19 	A foo;
20 	B bar;
21 
22 	2 in foo;
23 	2 in bar; // OK
24 	1.0 in bar;
25 }
26