You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The null-safety specification updates in dart-lang/language#941 and dart-lang/language#948 have been unfolded as part of the migration of tests/language/invalid_returns. This issue is concerned with updating the CFE correspondingly.
The following tests have a missing compile-time error:
The main reasons for the above is that the rules about return; are now more strict, and a void expression can no longer be returned in an async function with return type Future<Null> (and several similar types).
The following test incurs some compile-time errors that shouldn't be there:
language/invalid_returns/async_valid_returns_test
The reason for this is that the old rules required Future<flatten(S)> to be assignable to the return type where S is the type of the returned expression, and the new rules require S to be assignable to the future value type of the function, or flatten(S) to be a subtype thereof.
The text was updated successfully, but these errors were encountered:
eernstg
changed the title
Analyzer: Implementation of new static analysis for return statements
Front end: Implementation of new static analysis for return statements
May 7, 2020
The null-safety specification updates in dart-lang/language#941 and dart-lang/language#948 have been unfolded as part of the migration of
tests/language/invalid_returns
. This issue is concerned with updating the CFE correspondingly.The following tests have a missing compile-time error:
The main reasons for the above is that the rules about
return;
are now more strict, and a void expression can no longer be returned in anasync
function with return typeFuture<Null>
(and several similar types).The following test incurs some compile-time errors that shouldn't be there:
The reason for this is that the old rules required
Future<flatten(S)>
to be assignable to the return type whereS
is the type of the returned expression, and the new rules requireS
to be assignable to the future value type of the function, orflatten(S)
to be a subtype thereof.The text was updated successfully, but these errors were encountered: