Bug 5471 – Delegates with qualified value params can't be implicitly cast

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-01-21T06:55:00Z
Last change time
2011-06-15T23:36:12Z
Assigned to
nobody
Creator
eatingstaples

Attachments

IDFilenameSummaryContent-TypeSize
873main.dCode demonstrating the problem.application/octet-stream775

Comments

Comment #0 by eatingstaples — 2011-01-21T06:55:47Z
Created attachment 873 Code demonstrating the problem. Delegates with value-type parameters which are qualified with things like const or immutable can't be cast to delegates which have the same parameters, but differently-qualified. Function pointers do not have this problem.
Comment #1 by yebblies — 2011-06-15T23:36:12Z
This is delegate contravariance, and is not going to happen. *** This issue has been marked as a duplicate of issue 3075 ***