Bug 24643 – Allow overriding of private/package class methods

Status
NEW
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-07-01T17:04:56Z
Last change time
2024-12-13T19:36:10Z
Assigned to
No Owner
Creator
Bolpat
Moved to GitHub: dmd#20479 →

Comments

Comment #0 by qs.il.paperinik — 2024-07-01T17:04:56Z
"Symbols with private visibility can only be accessed from within the same module. Private member functions are implicitly final and cannot be overridden." This makes no sense as a derived class in the same module can "see" the method. Also, the spec says nowhere that `package` visibility functions aren’t virtual or abstract, but one get the error message: "function `A.f` `package` functions cannot be `abstract`" And they cannot be overridden.
Comment #1 by robert.schadek — 2024-12-13T19:36:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20479 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB