MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag8101b.d
bloba55ef731ad2b2cb06f9c00704dd7ddf5f0c0f16d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag8101b.d(28): Error: none of the overloads of `foo` are callable using argument types `(double)`
5 fail_compilation/diag8101b.d(19): Candidates are: `diag8101b.S.foo(int __param_0)`
6 fail_compilation/diag8101b.d(20): `diag8101b.S.foo(int __param_0, int __param_1)`
7 fail_compilation/diag8101b.d(30): Error: function `diag8101b.S.bar(int __param_0)` is not callable using argument types `(double)`
8 fail_compilation/diag8101b.d(30): cannot pass argument `1.0` of type `double` to parameter `int __param_0`
9 fail_compilation/diag8101b.d(33): Error: none of the overloads of `foo` are callable using a `const` object
10 fail_compilation/diag8101b.d(19): Candidates are: `diag8101b.S.foo(int __param_0)`
11 fail_compilation/diag8101b.d(20): `diag8101b.S.foo(int __param_0, int __param_1)`
12 fail_compilation/diag8101b.d(35): Error: mutable method `diag8101b.S.bar` is not callable using a `const` object
13 fail_compilation/diag8101b.d(22): Consider adding `const` or `inout` here
14 ---
17 struct S
19 void foo(int) { }
20 void foo(int, int) { }
22 void bar(int) { }
25 void main()
27 S s;
28 s.foo(1.0);
30 s.bar(1.0);
32 const(S) cs;
33 cs.foo(1);
35 cs.bar(1);