MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag10415.d
blob207f6a4aa1508e2945284d3096d46713ef24bfe3
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag10415.d(36): Error: none of the overloads of `x` are callable using argument types `(int) const`
5 fail_compilation/diag10415.d(13): Candidates are: `diag10415.C.x()`
6 fail_compilation/diag10415.d(18): `diag10415.C.x(int __param_0)`
7 fail_compilation/diag10415.d(39): Error: d.x is not an lvalue
8 ---
9 */
11 class C
13 @property int x() const
15 return 0;
18 @property void x(int)
23 template AddProp() { @property int x() { return 1; } }
24 template AddFunc() { void x(int, int) {} }
26 class D
28 // overloadset
29 mixin AddProp;
30 mixin AddFunc;
33 void main()
35 const c = new C();
36 c.x = 1;
38 auto d = new D();
39 d.x = 1;