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

"Implement interface" IDE options disappear when the class has a static member with the same name #73420

Open
datvm opened this issue May 10, 2024 · 0 comments

Comments

@datvm
Copy link

datvm commented May 10, 2024

Version Used: .NET 8.0.204

Steps to Reproduce:

  1. Enter the following code:
public interface IFoo
{
    void A();
}

public class Foo : IFoo
{

    // public static void A() { /* Do stuff */ } <-- this line

}
  1. At Foo declaration, IDE should correctly show two suggestions to implement IFoo:
    image

  2. Now uncomment the commented line, the options disappears when the second option should still be valid:

image

  1. Interestingly, if IFoo has another method like void B();, the suggestions are still present. The 2nd option is actually helpful.

image

Diagnostic Id:

Expected Behavior:

The suggestions to implement an interface should remain.

Actual Behavior:

The suggestion disappears even though the class does not actually implement the interface yet.

@datvm datvm changed the title Implement interface IDE options disappear when the class has a static member with the same name "Implement interface" IDE options disappear when the class has a static member with the same name May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant