The following code fails to compile: class Foo { auto foo() { return "Foo.foo"; } } class Bar : Foo { override auto foo() { return "Bar.foo"; } } void main() {} It doesn't matter if "override" is specified or not. The error message received is: Error: function main.Bar.foo of type () overrides but is not covariant with main.Foo.foo of type ()
*** Issue 10195 has been marked as a duplicate of this issue. ***
*** Issue 10021 has been marked as a duplicate of this issue. ***
*** Issue 9784 has been marked as a duplicate of this issue. ***
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6c2da99b6a968a3d68a6feb841714b0c5189fa24 Better error message for currently unsupported issue 8318
Now says: testx.d(8): Error: function testx.Bar.foo return type inference is not supported if may override base class function