Confusing warning message on assignment to typedefs with type parameters #18840
Labels
analyzer-ux
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Milestone
The following code warns that "A value of type 'compare' cannot be assigned to a variable of type 'Comparable'
The warning goes away if you remove the type parameter from the field's annotation.
class A<V> {
Comparator<V> comparator = Comparable.compare;
}
The text was updated successfully, but these errors were encountered: