D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20157 - [diagnostic] Name suggest for override should only list virtual functions
Summary: [diagnostic] Name suggest for override should only list virtual functions
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2019-08-23 13:40 UTC by Adam D. Ruppe
Modified: 2024-12-13 19:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Adam D. Ruppe 2019-08-23 13:40:19 UTC
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 dlangBugzillaToGithub 2024-12-13 19:05:10 UTC
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