Summary: Delegate Covariance
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2011-03-16 10:01:36 PDT ---
class A {}
class B : A {}

void main() {
    A delegate() foo;
    B delegate() bar;
    foo = bar;

Error: cannot implicitly convert expression (bar) of type B delegate() to A

Is there any reason why this shouldn't work?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to