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

Cascaded unreachable code diagnostic after missing break in case block #612

Closed
gafter opened this issue Feb 18, 2015 · 1 comment · Fixed by #785
Closed

Cascaded unreachable code diagnostic after missing break in case block #612

gafter opened this issue Feb 18, 2015 · 1 comment · Fixed by #785
Assignees
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Language-C# Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented Verified
Milestone

Comments

@gafter
Copy link
Member

gafter commented Feb 18, 2015

Originally from http://roslyn.codeplex.com/workitem/330


SSL reported:

switch (1) {
case 1:
}
int i;

The case label correctly gives an error for the missing break.
However, the int i; statement then gives an incorrect Unreachable Code warning.

@gafter gafter self-assigned this Feb 20, 2015
@gafter gafter added this to the 1.0-rc2 milestone Feb 20, 2015
gafter added a commit to gafter/roslyn that referenced this issue Feb 23, 2015
… switch section.

Because the end of a switch section is required not to be reachable by the
language specfication, this only affects the results in error situations by suppressing
cascaded diagnostics. Fixes dotnet#612.
@gafter gafter added 4 - In Review A fix for the issue is submitted for review. Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. and removed 3 - Working labels Feb 23, 2015
@gafter gafter removed the 4 - In Review A fix for the issue is submitted for review. label Feb 25, 2015
@gafter gafter removed their assignment Feb 25, 2015
@gafter gafter added the Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented label Feb 25, 2015
@gafter
Copy link
Member Author

gafter commented Mar 9, 2015

@jaredpar could you please "Verify" that this is fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Language-C# Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented Verified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants