Bug 10688 – Misleading error message when attempting a "private override"
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-21T02:18:00Z
Last change time
2013-07-25T12:37:19Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
Marco.Leise
Comments
Comment #0 by Marco.Leise — 2013-07-21T02:18:29Z
class Bar: Foo {
private:
override void func() {}
}
This doesn't compile and print "cannot override a non-virtual function". It took me a while to realize that the problem (in a larger class) was not in the base class, but in the attributes of the override.
What about error messages like:
"cannot reduce visibility of override" or
"overrides must not be private"