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

Incorrect 'default expression can be simplified' in switch case #25337

Closed
Neme12 opened this issue Mar 8, 2018 · 0 comments
Closed

Incorrect 'default expression can be simplified' in switch case #25337

Neme12 opened this issue Mar 8, 2018 · 0 comments
Labels

Comments

@Neme12
Copy link
Contributor

Neme12 commented Mar 8, 2018

switch (true)
{
    case default(bool):
        break;
}

(bool) is greyed out with an offered fix to simplify. Applying the fix results in an error (CS8313 A default literal 'default' is not valid as a case constant.)

@Neme12 Neme12 changed the title Incorrect 'default expression can be simplified in switch case' Incorrect 'default expression can be simplified' in switch case Mar 8, 2018
@jcouv jcouv added the Area-IDE label Mar 8, 2018
@Neme12 Neme12 closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants