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

Fix case where we were erroneously offering to convert a dictionary to use a collection expression. #75897

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #75894

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 13, 2024
@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review November 13, 2024 19:27
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 13, 2024 19:27
@CyrusNajmabadi
Copy link
Member Author

@JoeRobich ptal. Tnx

void Main()
{
Dictionary<string, string> a = null;
Dictionary<string, string> d = new(a);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new(a);

dumb question: how does the test know which line it is operating on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It analyzes the entire file and reports all the diagnostics it finds. No diagnostics are reported here (hence no annotations in the test markup).

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix occurrence of IDE0028 for a c# Dictionary causes compile error CS9215
3 participants