Summary: cannot implicitly assign delegate taking const to a
                    delegate reference taking mutable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Shahid <> 2012-03-14 09:35:03 PDT ---
    alias int delegate( const int[] ) A;
    alias int delegate(       int[] ) B;

    A a;
    B b = cast(B) a; // OK

    B b2 = a; // Error: cannot implicitly convert expression (a) of type
              // int delegate(const(int[])) to int delegate(int[])

I think the cast is unnecessary, (b) should be allowed to point to a delegate
of type (A) as well.

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

Reply via email to