Bug 12621 – [Reg]: covariance no longer checked for function overriding

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-22T23:48:00Z
Last change time
2014-04-29T14:56:12Z
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2014-04-22T23:48:50Z
class C15 { void foo() pure; void bar(); } class D15 : C15 { override void foo(); // should issue a covariant error override void bar() pure; // not an error - pure can override impure } dmd used to diagnose this correctly. Same issue with nothrow and @safe attributes.
Comment #1 by k.hara.pg — 2014-04-23T02:08:41Z
It's a feature introduced from 2.059, which was implemented by YOU. https://github.com/D-Programming-Language/dmd/commit/5c75bb31dd99a33b921f6038e3d1c1d7eb0333cd Now the feature is properly documented. https://github.com/D-Programming-Language/dlang.org/pull/225
Comment #2 by bugzilla — 2014-04-23T08:37:37Z
Thanks for setting me straight.
Comment #3 by yebblies — 2014-04-29T14:56:12Z
(In reply to Walter Bright from comment #2) > Thanks for setting me straight. Any chance this means you've reconsidered this awful feature?