Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: docs/language/dartLangSpec.tex

Issue 2979523002: The actual change to the wording of `assert` that I intended in the previous CL. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/language/dartLangSpec.tex
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index d717980b38f336159330eef7bb8e4abc0a2c5324..0b87147626a3076941b2f9911ef2f60a4908377b 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -6774,17 +6774,12 @@ execution of an assertion \code{\ASSERT{}($c$, $e$)} proceeds as follows:
\LMHash{}
The expression $c$ is evaluated to an object $o$.
-If the class of $o$ is not a subtype of \code{Function} then
-let $r$ be $o$.
-Otherwise,
-if the assertion occurs in the initializer list of a \CONST{} constructor,
-then we say that the assertion failed,
-otherwise let $r$ be the result of invoking $o$ with no arguments.
-It is a dynamic type error if $o$ is not of type \code{bool} or of type \code{Function}, or if $r$ is not of type \code{bool}.
-If $r$ is \FALSE{}, we say that the assertion failed.
-If $r$ is \TRUE{}, we say that the assertion succeeded.
-If the assertion succeeded, execution of the assert statement completes normally (\ref{completion}).
-If the assertion failed, $e$ is evaluated to an object $m$.
+If the class of $o$ is a subtype of \code{Function} and assertion occurs in the initializer list of a \CONST{} constructor,
eernst 2017/07/10 13:03:58 Typo: `and [the] assertion`. But I don't get this
+then let $r$ be the result of invoking $o$ with no arguments.
+Otherwise let $r$ be $o$.
+It is a dynamic type error if $r$ is not of type \code{bool}.
+If $r$ is \TRUE{}, execution of the assert statement completes normally (\ref{completion}).
+Otherwise, $e$ is evaluated to an object $m$.
Then the execution of the assert statement throws (\ref{completion}) an \code{AssertionError} containing $m$ and with a stack trace corresponding to the current execution state at the \ASSERT{} statement.
\LMHash{}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698