Closed
Description
If a type parameter has a type parameter itself (e.g., <T extends Iterable<U>, U>
), the inner type parameter is not inferred (U
).
dev.66. I've attached a repro. I expected the output of this program to be List<String> String
, but it is List<String> dynamic
.
void main() {
final object = getFirstObject(["string"]);
}
U getFirstObject<T extends Iterable<U>, U>(T iterable) {
print("$T $U");
return iterable.first;
}