Open
Description
Consider the following program:
void main() {
List<(int?, int?)> xs = <(Null, int)>[];
}
This program causes the lint prefer_void_to_null
to flag the use of the type Null
, and it is suggested that it should be replaced by void
.
This is a false positive: List<(void, int)>
is not a subtype of List<(int?, int?)>
and hence the suggested change would turn the program into a compile-time error.
The expected behavior would be that this occurrence of Null
is not linted.
Metadata
Metadata
Assignees
Labels
A bug or feature request we're likely to work onFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.Issues with the analyzer's support for the linter packageIssues related to lint rules that report a problem when it isn't a problem.Incorrect behavior (everything from a crash to more subtle misbehavior)