Bug 14113 – Lexically first function is picked as overriding one even if it's `const` and base one isn't

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-02-02T17:15:27Z
Last change time
2024-12-13T18:39:54Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Denis Shelomovskii
Moved to GitHub: dmd#18941 →

Comments

Comment #0 by verylonglogin.reg — 2015-02-02T17:15:27Z
This code should compile: --- class A { abstract void f(); } class B: A { override void f() { } // no errors here void f() const { } } class C: A { void f() const { } // line 14 override void f() { } // line 15 } --- main.d(14): Deprecation: implicitly overriding base class method main.A.f with main.C.f deprecated; add 'override' attribute main.d(15): Error: function main.C.f multiple overrides of same function ---
Comment #1 by robert.schadek — 2024-12-13T18:39:54Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18941 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB