-
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 ondevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.Issues related to lint rules that report a problem when it isn't a problem.linter-set-recommendedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Example:
extension type B<T>(T? _) {}
extension type N(Null _) implements B<Never> {}which yields the info:
Analyzing badwarn.dart...
info - badwarn.dart:2:18 - Unnecessary use of the type 'Null'.
Try using 'void' instead. - prefer_void_to_null
1 issue found.
Since changing Null to void would be a compile-time error, extension type representation types might not be the best place to apply that info.
(Any time a type has to be a subtype of some other type, suggesting void instead of Null risks being invalid.)
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.Issues related to lint rules that report a problem when it isn't a problem.linter-set-recommendedtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)