Bug 5472 – Overriding virtual function with qualified parameters causes error

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-01-21T06:59:00Z
Last change time
2011-06-15T23:37:29Z
Assigned to
nobody
Creator
eatingstaples

Attachments

IDFilenameSummaryContent-TypeSize
874main.dCode demonstrating the issue.application/octet-stream234

Comments

Comment #0 by eatingstaples — 2011-01-21T06:59:54Z
Created attachment 874 Code demonstrating the issue. Overriding a function in a base class with the same parameters, but different qualifiers on those parameters (such as const or immutable) causes an error, even if the parameters are value-type parameters.
Comment #1 by yebblies — 2011-06-15T23:37:29Z
This is contravariance for parameters, and is not going to happen. See Walter's comments in issue 3075.