Better diagnostics for mixing different nullness pattern matching ways #17432
Labels
Area-Compiler-PatternMatching
pattern compilation, active patterns, performance, codegen
Area-Diagnostics
mistakes and possible improvements to diagnostics
Area-Nullness
Issues related to handling of Nullable Reference Types
Milestone
There are 2 ways to do null-related pattern matching now:
Both produce no warnings, all good. What I don't like is the behavior when we start mixing those two approaches:
As a user I just want consistent diags here in the spirit of "hey, pick one way or another, don't mix things up" - ideally with exact pointers what to change but that's an extra.
I think such errors can happen really often because of fatfingering or copypasting - and casing differences are not even very noticeable, so there is accessibility in the game as well.
Originally posted by @psfinaki in #15181 (comment)
The text was updated successfully, but these errors were encountered: