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

Phase ordering issue in C# compiler with declaration diagnostics. #846

Open
gafter opened this issue Feb 25, 2015 · 0 comments
Open

Phase ordering issue in C# compiler with declaration diagnostics. #846

gafter opened this issue Feb 25, 2015 · 0 comments
Labels
Area-Compilers Bug Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Language-C#
Milestone

Comments

@gafter
Copy link
Member

gafter commented Feb 25, 2015

The field CSharpCompilation.SemanticDiagnostics is actually used to gather declaration diagnostics. Therefore no additional diagnostics should be placed into it once we are done with that phase. We had no code to check that invariant in the compiler. In practice what that means is that any diagnostics that are placed into this bag "too late" are simply dropped on the floor and not reported.

This should be fixed. It should not be possible to add diagnostics to that bag after we are done processing declarations.

I am changing the name of that to CSharpCompilation.DeclarationDiagnostics for clarity. I tried adding an assert to enforce the property that we do not add diagnostics too late, but that assert failed in a number of places (all of which are latent bugs). I am commenting out that assert for now, but we should track down and fix all of the latent bugs, and then reenable the assertion. The (disabled) assertion is the first line of CSharpCompilation.DeclarationDiagnostics.get

gafter added a commit to gafter/roslyn that referenced this issue Feb 25, 2015
@theoy theoy added this to the Unknown milestone Mar 5, 2015
@gafter gafter added the Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality label Sep 19, 2016
@gafter gafter modified the milestones: 15.6, Unknown May 15, 2017
@jcouv jcouv modified the milestones: 15.5, 15.later Sep 20, 2017
@jcouv jcouv modified the milestones: 15.6, 16.0 Dec 26, 2017
@jaredpar jaredpar modified the milestones: 16.0, Unknown Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Language-C#
Projects
None yet
Development

No branches or pull requests

4 participants