www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10007] New: 16 hours agofunction overrides but is not covariant

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10007

           Summary: 16 hours agofunction overrides but is not covariant
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: rswhite4 googlemail.com


--- Comment #0 from rswhite4 googlemail.com 2013-04-29 05:20:00 PDT ---
----
import std.stdio;

struct A { }

interface IFoo {
    void bar(ref const A);
}

class Foo : IFoo {
    void bar(ref const A a) {

    }

    void bar(const A a) {
        return this.bar(a);
    }
}
----
prints:

Error: function c517.Foo.bar of type void(const(A) a) overrides 
but is not covariant with c517.IFoo.bar of type void(ref const(A))

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 29 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10007


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-05-07 03:33:18 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1973

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10007



--- Comment #2 from github-bugzilla puremagic.com 2013-09-07 22:47:47 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/61e980de3dc57cc9d8502098ea11e5a2b4f1985a
fix Issue 10007 - function overrides but is not covariant

https://github.com/D-Programming-Language/dmd/commit/fc460eede168cf52879ca41191baf7db1f893569
Merge pull request #1973 from 9rnsr/fix10007

Issue 10007 - function overrides but is not covariant

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 07 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10007


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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