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

IDE0009 when using new in list initializers #29744

Closed
jeremyVignelles opened this issue Sep 10, 2018 · 3 comments
Closed

IDE0009 when using new in list initializers #29744

jeremyVignelles opened this issue Sep 10, 2018 · 3 comments
Labels
Area-IDE Resolution-Duplicate The described behavior is tracked in another issue
Milestone

Comments

@jeremyVignelles
Copy link

Version Used: VS pro 15.8.3

Steps to Reproduce:

This code shows the error:

                var test = new List<string>
                {
                    new string('c', 2)
                };

Expected Behavior:
I'm not using a field, this is not relevant here

Actual Behavior:

IDE0009 : Add 'this.' ...

The quick fix does nothing.

@zaytsev-victor
Copy link
Contributor

@jeremyVignelles as I know it is already fixed in master. But it isn't ported to 18.x version (or even in 19.x).
I hope that it will be ported to 18.x because it breaks "use 'this'" rule (especially with new formatting rules.)

@CyrusNajmabadi
Copy link
Member

@jinujoseph Another report of this issue. Still on hte list to consider porting back to 15.8?

@jinujoseph
Copy link
Contributor

this has been ported over to 15.9 , doesn't meet the 15.8 bar

@jinujoseph jinujoseph added the Resolution-Duplicate The described behavior is tracked in another issue label Sep 11, 2018
@jinujoseph jinujoseph added this to the 15.9 milestone Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

5 participants