Debian Codegraph @

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

raw
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/fail17354.d(12): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Foo.opEquals`; add `override` attribute
4 fail_compilation/fail17354.d(17): Error: cannot implicitly override base class method `object.Object.opEquals` with `fail17354.Bar.opEquals`; add `override` attribute
5 ---
6 */
7
8 // https://issues.dlang.org/show_bug.cgi?id=17354
9
10 final class Foo
11 {
12 bool opEquals(const Object) const {return true;}
13 }
14
15 class Bar
16 {
17 bool opEquals(const Object) const {return true;}
18 }