prefer_contains does not catch type parameters bound to Iterable (or promoted to) #58406
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
linter-false-negative
linter-set-recommended
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Describe the issue
prefer_contains does not catch type parameters bound to Iterable (or promoted to a bound of Iterable). For example:
To Reproduce
Expected behavior
Each of these should be reported.
Additional context
The recent
typeForInterfaceCheck
extension method on DartType should help. only_throw_errors needed a similar fix.The text was updated successfully, but these errors were encountered: