http://d.puremagic.com/issues/show_bug.cgi?id=10195
Summary: auto type inference on method override
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Sebastian Graf <[email protected]> 2013-05-28
13:58:15 PDT ---
Overload resolution fails to recognize baz in the following example to be a
valid candidate for an override:
interface Foo {
int baz();
}
class Bar : Foo {
auto baz() { return cast(int)1; }
}
pragma(msg, typeof(Foo.baz).stringof); // int()
pragma(msg, typeof(Bar.baz).stringof); // int()
main.d(8): Error: function foo.Bar.baz of type () overrides but is not
covariant with foo.Foo.baz of type int()
It seems like auto isn't resolved before the covariance check.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------