May 28, 2013 [Issue 10195] New: auto type inference on method override | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: SebastianGraf@t-online.de --- Comment #0 from Sebastian Graf <SebastianGraf@t-online.de> 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: ------- |
May 28, 2013 [Issue 10195] auto type inference on method override | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sebastian Graf | http://d.puremagic.com/issues/show_bug.cgi?id=10195 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich@gmail.com Resolution| |DUPLICATE --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-05-28 13:59:32 PDT --- *** This issue has been marked as a duplicate of issue 8318 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation