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

Document break for negative Length tests #57149

Merged
merged 2 commits into from
Oct 17, 2021

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Oct 14, 2021

Also picked a few tests from closed PR #56721

The second commit uses file-scoped namespaces (so mostly indent change). Use ?w=1 in github URL to ignore whitespaces in diff, like so.

Relates to test plan #51289

FYI @alrz

";
var comp = CreateCompilation(src);
comp.VerifyDiagnostics(
// (5,7): warning CS8509: The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern 'not null' is not covered.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This diagnostic may seem odd, but I think it's correct. The switch is null => ..., <impossible> => ... so we indeed didn't handle not null.

@jcouv jcouv marked this pull request as ready for review October 14, 2021 18:22
@jcouv jcouv requested a review from a team as a code owner October 14, 2021 18:22
@jcouv jcouv requested a review from 333fred October 14, 2021 22:57
@jcouv jcouv added Documentation Test Test failures in roslyn-CI labels Oct 14, 2021
@jcouv jcouv mentioned this pull request Oct 15, 2021
91 tasks
@jcouv jcouv merged commit 781dc6a into dotnet:features/list-patterns Oct 17, 2021
@jcouv jcouv deleted the length-break2 branch October 17, 2021 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants