Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail4511.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail4511.d(18): Error: cannot implicitly override base class method `fail4511.test72.X.func` with `fail4511.test72.Y.func`; add `override` attribute
5 ---
6 */
7 void test72()
8 {
9 class A {}
10 class B : A {}
11
12 class X
13 {
14 abstract A func();
15 }
16 class Y : X
17 {
18 B func() { return new A(); }
19 }
20 }
21
22 void main() {}