mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
Removed rule against return; & return e; in same function
Change-Id: I8b2e1bc5b8003b7a6fb4b6660f268a42995046dc Reviewed-on: https://dart-review.googlesource.com/71780 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
parent
65b8ab114c
commit
9388cb3d0c
|
@ -8754,11 +8754,6 @@ Leaving the return type of a function marked \ASYNC{} blank will be interpreted
|
|||
\LMHash{}
|
||||
Executing a return statement with no expression, \code{\RETURN;} returns with no value (\ref{completion}).
|
||||
|
||||
\LMHash{}
|
||||
% TODO(eernst): For integration of invalid_returns.md: We do allow that now, and
|
||||
% many other things, eg `void foo(bool b) { if (b) return; return print(''); }`.
|
||||
It is a compile-time error if a function contains both one or more explicit return statements of the form \code{\RETURN;} and one or more return statements of the form \code{\RETURN{} $e$;}.
|
||||
|
||||
|
||||
\subsection{Labels}
|
||||
\LMLabel{labels}
|
||||
|
|
Loading…
Reference in a new issue