Thread overview
[Issue 8318] New: Cannot override a method with inferred return type
Jun 29, 2012
Jacob Carlborg
May 28, 2013
Andrej Mitrovic
May 28, 2013
Sebastian Graf
Jul 16, 2013
Kenji Hara
June 29, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8318

           Summary: Cannot override a method with inferred return type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: doob@me.com


--- Comment #0 from Jacob Carlborg <doob@me.com> 2012-06-29 12:57:04 PDT ---
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 ()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8318


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |SebastianGraf@t-online.de


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-05-28 13:59:32 PDT ---
*** Issue 10195 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8318



--- Comment #2 from Sebastian Graf <SebastianGraf@t-online.de> 2013-05-28 14:01:45 PDT ---
*** Issue 10021 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 16, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8318


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yazan.dabain@gmail.com


--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2013-07-15 22:05:18 PDT ---
*** Issue 9784 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8318



--- Comment #4 from github-bugzilla@puremagic.com 2013-09-07 22:47:42 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------