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

"Create Object Initializer" Code Refactoring should not be suggested for collection types #53

Closed
KerbalSpike opened this issue Dec 22, 2020 · 1 comment · Fixed by #71
Assignees
Labels
bug Something isn't working codeanalysis-coderefactorings Microsoft.CodeAnalysis.CodeRefactorings
Milestone

Comments

@KerbalSpike
Copy link
Collaborator

KerbalSpike commented Dec 22, 2020

image

Code to reproduce:

using System.Collections.Generic;

namespace Test
{
	class Class1
	{
		public void Test()
		{
			var x = new List<string>();
		}
	}
}
@Flash0ver
Copy link
Owner

Fixed in v0.6.1 - the "Create Object Initializer" Code Refactoring no longer registers a code action with collection types.
Thank you @KerbalSpike for trying out our Analyzers and reporting this issue.

@Flash0ver Flash0ver added the codeanalysis-coderefactorings Microsoft.CodeAnalysis.CodeRefactorings label Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codeanalysis-coderefactorings Microsoft.CodeAnalysis.CodeRefactorings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants