Type parameter bounds can be marked "exact nullable" if upcast. #40551
Labels
area-migration (deprecated)
Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).
NNBD
Issues related to NNBD Release
nnbd-migration-correctness-example
Concrete examples of the migration engine producing an incorrect result on a phase 1 package
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This migration should produce no source edits.
Currently, the assignment from
List<T>
toList<dynamic>
results in an edge from the bound ofT
to thedynamic
type argument inList<dynamic>
. This is correct.But it has an unfortunate consequence, it means that when
dynamic
is marked exact nullable (by assigningnull
to the list index), that exact nullability is propagated upstream, and that is currently not stopped in any way from marking the bound ofT
as exact nullable.We therefore get
T extends Object?
whis is unnecessary.This occurs in package:async.
The text was updated successfully, but these errors were encountered: