nnbd tool should create casts for function types #40384
Labels
area-migration (deprecated)
Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool).
nnbd-migration-correctness-example
Concrete examples of the migration engine producing an incorrect result on a phase 1 package
P2
A bug or feature request we're likely to work on
In package:async, there are some compile errors from lazy test nulls combined with migrated async apis.
the null causes the type of
onCancel
to beFuture<R>? Function()
. That is an illegal assignment to the parameter ofFuture.sync
(Future<T> Function()
).Ultimately, the correct migration is probably to change the test to
but in terms of an output we can expect the migration tool to produce, we can emit a cast when passed into
Future.sync
:In the long run, this ideally will be highlighted as a place users should manually review
The text was updated successfully, but these errors were encountered: