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

Parenthesized switch case expressions rejected in master with langver 7 #32161

Closed
gafter opened this issue Jan 4, 2019 · 0 comments
Closed

Comments

@gafter
Copy link
Member

gafter commented Jan 4, 2019

The following C# code is reportedly rejected in master with language version 7. This is a breaking change.

switch (notesColumn)
{
    case (-1):
        {
            // not found, do nothing;
            break;
        }
    case (0):
        {
            // root column, add to Items
            item.Text = justification.Text;
            break;
        }
    default:
        {
            // add to sub items
            item.SubItems[notesColumn].Text = justification.Text;
            break;
        }
}
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