Bug 7221 – implicit conversion between delegates with qualified parameter types

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-04T11:45:00Z
Last change time
2013-11-26T22:59:33Z
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-01-04T11:45:31Z
With DMD 2.057, all 6 assignments in the following code fail: void main(){ void delegate(immutable(int)[]) x1; x1 = (const(int)[] a){}; void delegate(int[]) x2; x2 = (const(int)[] a){}; immutable(int)[] delegate(immutable(int)[]) y1; y1 = delegate inout(int)[](inout(int)[] a){return a;}; int[] delegate(int[]) y2; y2 = delegate inout(int)[](inout(int)[] a){return a;}; const(int)[] delegate(const(int)[]) y3; y3 = delegate inout(int)[](inout(int)[] a){return a;}; immutable(int) delegate(immutable(int)) z; z = (int a){return a;}; } The code should compile.
Comment #1 by lovelydear — 2012-04-19T12:54:18Z
This code compiles on 2.059 win32.
Comment #2 by yebblies — 2013-05-10T05:57:42Z
Can we confirm this with a recent release?
Comment #3 by k.hara.pg — 2013-05-10T08:41:26Z
(In reply to comment #2) > Can we confirm this with a recent release? I think the code was *temporary* accepted in 2.059, because of the bug 7941. The regression was fixed in 2.060, and the code turned to fail compilation.
Comment #4 by yebblies — 2013-11-26T22:59:33Z
*** This issue has been marked as a duplicate of issue 3075 ***