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

Field initializer references a field which might not be initialized #42

Open
sharwell opened this issue Nov 16, 2015 · 0 comments
Open

Comments

@sharwell
Copy link
Member

It would be nice to have an analyzer for field references which detects cases like the one described in DotNetAnalyzers/StyleCopAnalyzers#1767. This analyzer could start simple, and grow to cover additional scenarios:

  1. A field initializer references a field which is declared later in the same file
  2. A field initializer references a field declared in a different file (relative order of initialization is undefined)
  3. A cycle exists in references from field initializers to fields in other type(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant