Introduce a "direct" access modifier to methods to allow only immediate children to call them #4478
Replies: 2 comments 5 replies
-
This can technically be done via an attribute and analyzer reporting error. The pattern isn't common enough for language support. Generally, anything shrinks accessibility will probably be rejected as language feature. |
Beta Was this translation helpful? Give feedback.
-
There is nothing in the runtime that prevents a direct call to any method in the hierarchy. In fact being able to statically call any base method is required to enable |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Rewritten summary of original at https://developercommunity.visualstudio.com/t/Add-an-access-modifier-direct-to-re/804559 :
PROPOSAL:
USE-CASE:
RATIONALE:
IMPLEMENTATION:
PSEUDOCODE EXAMPLE:
DESIRED BEHAVIOR:
BENEFITS:
Beta Was this translation helpful? Give feedback.
All reactions