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

Improve the "not exhaustive" diagnostic in the presence of a when clause. #46143

Merged
merged 4 commits into from
Jul 29, 2020

Conversation

gafter
Copy link
Member

@gafter gafter commented Jul 20, 2020

Fixes #45157

@gafter gafter requested a review from a team as a code owner July 20, 2020 22:15
@gafter gafter self-assigned this Jul 20, 2020
@gafter gafter added Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Feature - Pattern Matching Pattern Matching labels Jul 20, 2020
@gafter gafter added this to the 16.8 milestone Jul 20, 2020
@gafter
Copy link
Member Author

gafter commented Jul 20, 2020

@alrz This is based on your suggestion.

@gafter
Copy link
Member Author

gafter commented Jul 21, 2020

@dotnet/roslyn-compiler May I please have a couple of reviews of this diagnostic improvement?

1 similar comment
@gafter
Copy link
Member Author

gafter commented Jul 22, 2020

@dotnet/roslyn-compiler May I please have a couple of reviews of this diagnostic improvement?

@gafter gafter requested a review from a team July 23, 2020 18:26
@gafter
Copy link
Member Author

gafter commented Jul 24, 2020

@dotnet/roslyn-compiler May I please have a second review?

2 similar comments
@gafter
Copy link
Member Author

gafter commented Jul 27, 2020

@dotnet/roslyn-compiler May I please have a second review?

@gafter
Copy link
Member Author

gafter commented Jul 28, 2020

@dotnet/roslyn-compiler May I please have a second review?

@@ -22,23 +22,26 @@ internal static class PatternExplainer
/// <param name="nodes">The set of nodes in topological order.</param>
/// <param name="node">The node of interest.</param>
/// <param name="nullPaths">Whether to permit following paths that test for null.</param>
/// <param name="requiresFalseWhenClause">set to true when if the path requires some when clause to evaluate to 'false'</param>
Copy link
Member

Choose a reason for hiding this comment

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

when if [](start = 62, length = 7)

Typo?

@ghost
Copy link

ghost commented Jul 29, 2020

Hello @gafter!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Auto-approval

@gafter gafter removed the auto-merge label Jul 29, 2020
@gafter gafter merged commit 06c2ace into dotnet:master Jul 29, 2020
@ghost ghost modified the milestones: 16.8, Next Jul 29, 2020
333fred added a commit to 333fred/roslyn that referenced this pull request Jul 31, 2020
* upstream/master: (304 commits)
  Tweak diagnostics to account for records (dotnet#46341)
  Diagnose precedence inversion in a warning wave (dotnet#46239)
  Remove PROTOTYPE tag (dotnet#45965)
  Only run a single pass of NullableWalker per-member (dotnet#46402)
  Fix crash, and offer "declare as nullable" for tuple fields (dotnet#46437)
  Simplify contract for RunWithShutdownBlockAsync
  Fix optprof plugin input
  check if EditorAdaptersFactoryService gives us a null buffer
  Cannot assign maybe-null value to TNotNull variable (dotnet#41445)
  Fix overload resolution to handle binary compat in the face of covariant returns (dotnet#46367)
  Same failure on Linux
  Skip some tests on Mac
  Added search option for inline parameter name hints
  Spelling
  tweak docs
  Improve comment
  Improve the "not exhaustive" diagnostic in the presence of a when clause. (dotnet#46143)
  PR feedback
  Use record keyword to display records (dotnet#46338)
  remove test that aserts .NET Standard should be prefered over .NET Framework
  ...
@RikkiGibson RikkiGibson removed this from the Next milestone Aug 11, 2020
@RikkiGibson RikkiGibson added this to the 16.8.P2 milestone Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. Feature - Pattern Matching Pattern Matching
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the "not exhaustive" diagnostic in the presence of a when clause.
3 participants