Closed
Description
class B<T extends Object> {
void f(T t) {
// Create an edge from the bound to some type
List<dynamic> x = [t];
// and make that type exact nullable
x[0] = null;
}
}
This migration should produce no source edits.
Currently, the assignment from List<T>
to List<dynamic>
results in an edge from the bound of T
to the dynamic
type argument in List<dynamic>
. This is correct.
But it has an unfortunate consequence, it means that when dynamic
is marked exact nullable (by assigning null
to the list index), that exact nullability is propagated upstream, and that is currently not stopped in any way from marking the bound of T
as exact nullable.
We therefore get T extends Object?
whis is unnecessary.
This occurs in package:async.
Metadata
Metadata
Assignees
Labels
Issues related to NNBD ReleaseA lower priority bug or feature requestDeprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).Concrete examples of the migration engine producing an incorrect result on a phase 1 packageIncorrect behavior (everything from a crash to more subtle misbehavior)