Closed
Description
The migration tool doesn't recognize the effect functions that return Never
have on the control flow of a function. Consider the following unmigrated code:
Never bail() => throw "oh no";
int foo() {
int a;
if (a == null) bail();
return a;
}
The migrator correctly tries to change int a
to int? a
but it also tries to change int foo()
to int? foo()
, which is unnecessary.