Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Interface Implementation "ShouldOverrideAttribute" #35008

Open
NinoFloris opened this issue Apr 16, 2019 · 1 comment
Open

Default Interface Implementation "ShouldOverrideAttribute" #35008

NinoFloris opened this issue Apr 16, 2019 · 1 comment
Labels
Area-Analyzers Need Design Review The end user experience design needs to be reviewed and approved.
Milestone

Comments

@NinoFloris
Copy link

I propose roslyn should respect an attribute like "ShouldOverrideAttribute" that signifies a specific default interface method should rather be re-implemented instead of left as a default.

I foresee this being almost necessary when you version an existing interface to include a new method where you don't have a sane default implementation besides throwing.

When the attribute is applied csc (or maybe just analyzers) can warn or hint implementation authors when they re-compile against the newer interface that there is a method they should probably implement.

@gafter
Copy link
Member

gafter commented Apr 16, 2019

If this is to be required by the language and enforced by the compiler, then this is a language feature request and belongs in the csharplang repository.

If it is instead intended to be enforced by tooling (i.e. the IDE), then this should be reassigned the Analyzers or IDE area.

I assume the latter was the intent, so assigning to Analyzers.

@jinujoseph jinujoseph added the Need Design Review The end user experience design needs to be reviewed and approved. label Apr 16, 2019
@jinujoseph jinujoseph added this to the Backlog milestone Apr 16, 2019
@sharwell sharwell moved this to In Queue in IDE: Design review Aug 22, 2023
@CyrusNajmabadi CyrusNajmabadi moved this from In Queue to Complete in IDE: Design review Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Need Design Review The end user experience design needs to be reviewed and approved.
Projects
Status: Complete
Development

No branches or pull requests

3 participants