Bug 20157 – [diagnostic] Name suggest for override should only list virtual functions

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-08-23T13:40:19Z
Last change time
2024-12-13T19:05:10Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Adam D. Ruppe
Moved to GitHub: dmd#19613 →

Comments

Comment #0 by destructionator — 2019-08-23T13:40:19Z
Easier to describe in code: --- class A { final void a(int) {} void a(string) {} } class B : A { override void a(int) {} } --- Yields: Error: function bug.B.a cannot override final function bug.A.a Error: function void bug.B.a(int) does not override any function, did you mean to override void bug.A.a(int)? I didn't mean to override a(int) because it is final, the compiler error message could make sure it is at least suggesting a relevant virtual function.
Comment #1 by robert.schadek — 2024-12-13T19:05:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19613 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB