-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondart-model-language-patternsIssues with analyzer's support for the patterns language featureIssues with analyzer's support for the patterns language featuredevexp-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Description
This code:
class C {
void Function()? callback;
}
f(Object o) {
switch (o) {
case C(callback: null): // (1)
}
}
Produces the diagnostic WarningCode.CONSTANT_PATTERN_NEVER_MATCHES_VALUE_TYPE
at (1).
There should not be any warning; callback
is nullable, so null
is a possible match.
Reproduced with fa3a72f.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondart-model-language-patternsIssues with analyzer's support for the patterns language featureIssues with analyzer's support for the patterns language featuredevexp-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.