[Issue 7708] New: cannot implicitly assign delegate taking const to a delegate reference taking mutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 14 09:34:53 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7708
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
AssignedTo: nobody at puremagic.com
ReportedBy: govellius at gmail.com
--- Comment #0 from Shahid <govellius at gmail.com> 2012-03-14 09:35:03 PDT ---
main()
{
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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list