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

Quick info shows incorrect Dispose method when hovering over using keyword #75429

Closed
DoctorKrolic opened this issue Oct 8, 2024 · 0 comments · Fixed by #75462
Closed

Quick info shows incorrect Dispose method when hovering over using keyword #75429

DoctorKrolic opened this issue Oct 8, 2024 · 0 comments · Fixed by #75462
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone

Comments

@DoctorKrolic
Copy link
Contributor

Steps to Reproduce:

using var s1 = new MyDisposableStruct(); // 1
using var s2 = new MyStruct(); // 2
using var s3 = new MyRefStruct(); // 3

public readonly struct MyDisposableStruct : IDisposable
{
    public void Dispose()
    {
    }
}

public readonly struct MyStruct
{
    public void Dispose()
    {
    }
}

public readonly ref struct MyRefStruct
{
    public void Dispose()
    {
    }
}

Hover over using keyword in all 3 cases

Expected Behavior:
Quick info shows specific Dispose method for each case (even for case 2 although it is an error)

Actual Behavior:
Case 1 - shows MyDisposableStruct.Dispose() - correct
Cases 2 and 3 - show IDisposable.Dispose() method even though neither structs implement IDisposable

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 8, 2024
@CyrusNajmabadi CyrusNajmabadi added Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 8, 2024
@CyrusNajmabadi CyrusNajmabadi added this to the Backlog milestone Oct 8, 2024
@github-project-automation github-project-automation bot moved this to InQueue in Small Fixes Oct 8, 2024
@github-project-automation github-project-automation bot moved this from InQueue to Completed in Small Fixes Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants