Chromium Code Reviews| Index: docs/language/dartLangSpec.tex |
| diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex |
| index f643ef1b4c525783671578723d7bb4eb0c3ac4ee..1eaea8d53273d6c51c9846bee0892f629d82e920 100644 |
| --- a/docs/language/dartLangSpec.tex |
| +++ b/docs/language/dartLangSpec.tex |
| @@ -6453,8 +6453,13 @@ It is a static type warning if the body of $f$ is marked \ASYNC{} and the type \ |
| \LMHash{} |
| Let $S$ be the runtime type of $o$. In checked mode: |
| \begin{itemize} |
| -\item If the body of $f$ is marked \ASYNC{} (\ref{functions}) it is a dynamic type error if $o$ is not \NULL{} (\ref{null}) and \code{Future<flatten(S)>} is not a subtype of the actual return type (\ref{actualTypeOfADeclaration}) of $f$. |
| -\item Otherwise, it is a dynamic type error if $o$ is not \NULL{} and the runtime type of $o$ is not a subtype of the actual return type of $f$. |
| +\item If the body of $f$ is marked \ASYNC{} (\ref{functions}) |
| +it is a dynamic type error if $o$ is not \NULL{} (\ref{null}), |
| +the actual return type (\ref{actualTypeOfADeclaration}) of $f$ is not \VOID, |
|
eernst
2017/05/10 14:38:48
At this point we have assumed that (the body of) $
Lasse Reichstein Nielsen
2017/05/11 06:09:59
The change to make `return e;` an error, not just
eernst
2017/05/11 09:56:13
I recommended the comment because I suspect that i
|
| +and \code{Future<flatten(S)>} is not a subtype of the actual return type of $f$. |
| +\item Otherwise, it is a dynamic type error if $o$ is not \NULL{}, |
| +the actual return type of $f$ is not \VOID{}, |
| +and the runtime type of $o$ is not a subtype of the actual return type of $f$. |
| \end{itemize} |
| \LMHash{} |