MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail262.d
blob7c92c7c18261709034601313515b217df45d865e
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail262.d(23): Error: function `const void fail262.B.f()` does not override any function, did you mean to override `shared const void fail262.A.f()`?
5 ---
6 */
8 // https://issues.dlang.org/show_bug.cgi?id=1645
9 // can override base class' const method with non-const method
10 import core.stdc.stdio;
12 class A
14 int x;
15 shared const void f()
17 printf("A\n");
21 class B : A
23 override const void f()
25 //x = 2;
26 printf("B\n");
30 void main()
32 A y = new B;
33 y.f;