★ wanayoo — archive 1999 https://github.com/code-cracker/code-cracker/issues/501Nouvelle recherche | Portail wanayoo
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

BUG on CC0008 and CC0009 (ObjectInitializer) when used with collection #501

Closed
giggio opened this issue Sep 8, 2015 · 0 comments
Closed

BUG on CC0008 and CC0009 (ObjectInitializer) when used with collection #501

giggio opened this issue Sep 8, 2015 · 0 comments
Assignees
Milestone

Comments

@giggio
Copy link
Member

@giggio giggio commented Sep 8, 2015

CC0008 will be incorrectly raised in this code:

var ys = new System.Collections.Generic.List<int> { 4 };
ys.Capacity = 3;

CC0009 will be incorrectly raised in this code:

new System.Collections.Generic.List<int> ys;
ys = new System.Collections.Generic.List<int> { 4 };
ys.Capacity = 3;

This will cause an error on the code fix, but the problem is with the analyzer, which is not checking initialization with a collection initializer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.