MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag12432.d
blob10755d84a037ea9dba263da58fa4386174200cf1
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag12432.d(55): Error: cannot infer argument types, expected 1 argument, not 2
5 fail_compilation/diag12432.d(56): Error: cannot infer argument types, expected 2 arguments, not 3
6 fail_compilation/diag12432.d(57): Error: cannot infer argument types, expected 1 argument, not 2
7 fail_compilation/diag12432.d(58): Error: cannot infer argument types, expected 1 argument, not 2
8 fail_compilation/diag12432.d(59): Error: cannot infer argument types, expected 2 arguments, not 3
9 fail_compilation/diag12432.d(60): Error: cannot infer argument types, expected 2 arguments, not 3
10 ---
13 struct R1
15 @property int front() { return 0; }
16 enum bool empty = false;
17 void popFront() { }
20 struct Tuple(T...)
22 T t;
23 alias t this;
26 struct R2
28 @property Tuple!(int, float) front() { return typeof(return).init; }
29 enum bool empty = false;
30 void popFront() { }
33 struct OpApply1Func
35 int opApply(int function(int)) { return 0; }
38 struct OpApply1Deleg
40 int opApply(int delegate(int)) { return 0; }
43 struct OpApply2Func
45 int opApply(int function(int, float)) { return 0; }
48 struct OpApply2Deleg
50 int opApply(int delegate(int, float)) { return 0; }
53 void main()
55 foreach (a, b; R1()) { }
56 foreach (a, b, c; R2()) { }
57 foreach (a, b; OpApply1Func()) { }
58 foreach (a, b; OpApply1Deleg()) { }
59 foreach (a, b, c; OpApply2Func()) { }
60 foreach (a, b, c; OpApply2Deleg()) { }