http://d.puremagic.com/issues/show_bug.cgi?id=3676

           Summary: shared function override
           Product: D
           Version: 2.038
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: repeate...@gmail.com


--- Comment #0 from Masahiro Nakagawa <repeate...@gmail.com> 2010-01-05 
06:26:07 PST ---
class Sample
{
    void method() {}
    shared void method() {}
}

class Sample2 : Sample
{
    override void method() {}
    override shared void method() {} // Line 10
}

2.037 succeeds in compiling this code, but 2.038 and 2.039 fail.
2.039 outputs following error message:

 foo.d(10): Error: function foo.Sample2.method of type shared void()
 overrides but is not covariant with foo.Sample2.method of type void()

For that matter, following code is minimum sample which same error occurs.

class Sample
{
    void method() {}
}

class Sample2 : Sample
{
    shared void method() {}
}

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

Reply via email to