Open
Description
Describe the issue
prefer_contains does not catch type parameters bound to Iterable (or promoted to a bound of Iterable). For example:
To Reproduce
bool typeVariableBoundToList<T extends List<int>>(T list) =>
list.indexOf(1) < 0; // LINT
bool typeVariablePromotedToList<T>(T list) =>
list is List<int> && list.indexOf(1) < 0; // LINT
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.