Skip to content

Commit e922a06

Browse files
committed
Correct usages of "final variable" and "constant variable"
1 parent bc95629 commit e922a06

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

specification/dartLangSpec.tex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,6 @@ \section{Variables}
14241424
is a variable whose declaration includes the modifier \FINAL.
14251425

14261426

1427-
14281427
\subsection{Implicitly Induced Getters and Setters}
14291428
\LMLabel{implicitlyInducedGettersAndSetters}
14301429

@@ -2334,8 +2333,8 @@ \subsection{Formal Parameters}
23342333
the formal parameter scope of $f$.
23352334

23362335
\LMHash{}%
2337-
It is a \Error{compile-time error} if a formal parameter
2338-
is declared as a constant variable (\ref{variables}).
2336+
It is a \Error{compile-time error} if a formal parameter declaration
2337+
has the modifier \CONST.
23392338
% We put the following error here because it's shared among all kinds of
23402339
% functions except one.
23412340
It is a \Error{compile-time error} if an optional formal parameter
@@ -8637,7 +8636,7 @@ \subsection{Constants}
86378636
that is not qualified by a deferred prefix,
86388637
is a potentially constant and constant expression.
86398638
\commentary{%
8640-
For example, if class $C$ declares a constant class variable $v$, !!!TODO!!!
8639+
For example, if class $C$ declares a static constant variable $v$,
86418640
\code{$C$.$v$} is a constant.
86428641
The same is true if $C$ is accessed via a prefix $p$;
86438642
\code{$p$.$C$.$v$} is a constant unless $p$ is a deferred prefix.%
@@ -18962,7 +18961,7 @@ \subsection{Local Variable Declaration}
1896218961
Otherwise, the variable $v$ is bound to $o$.
1896318962

1896418963
\LMHash{}%
18965-
Let $D$ be a \LATE{} and \FINAL{} local variable declaration
18964+
Let $D$ be a \LATE{} and final local variable declaration
1896618965
that declares a variable $v$.
1896718966
If an object $o$ is assigned to $v$
1896818967
in a situation where $v$ is unbound
@@ -19286,7 +19285,7 @@ \subsubsection{For-in}
1928619285
It follows that it is a compile-time error
1928719286
% The following error exists also in the case where \id{} is definitely
1928819287
% unassigned before the loop: The loop could run >1 time.
19289-
if $D$ is empty and \id{} is a final variable.
19288+
if $D$ is empty and \id{} is a final or constant variable.
1929019289
Also, it is a dynamic error if $e$ has type \DYNAMIC,
1929119290
but $e$ evaluates to an instance of a type
1929219291
which is not a subtype of \code{Iterable<Object?>}.%

0 commit comments

Comments
 (0)