Skip to content

Commit 68ddde9

Browse files
committed
Correct usages of "final variable" and "constant variable"
1 parent 9c91e5c commit 68ddde9

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
@@ -1475,7 +1475,6 @@ \section{Variables}
14751475
is a variable whose declaration includes the modifier \FINAL.
14761476

14771477

1478-
14791478
\subsection{Implicitly Induced Getters and Setters}
14801479
\LMLabel{implicitlyInducedGettersAndSetters}
14811480

@@ -2388,8 +2387,8 @@ \subsection{Formal Parameters}
23882387
the formal parameter scope of $f$.
23892388

23902389
\LMHash{}%
2391-
It is a \Error{compile-time error} if a formal parameter
2392-
is declared as a constant variable (\ref{variables}).
2390+
It is a \Error{compile-time error} if a formal parameter declaration
2391+
has the modifier \CONST.
23932392
% We put the following error here because it's shared among all kinds of
23942393
% functions except one.
23952394
It is a \Error{compile-time error} if an optional formal parameter
@@ -8800,7 +8799,7 @@ \subsection{Constants}
88008799
that is not qualified by a deferred prefix,
88018800
is a potentially constant and constant expression.
88028801
\commentary{%
8803-
For example, if class $C$ declares a constant class variable $v$, !!!TODO!!!
8802+
For example, if class $C$ declares a static constant variable $v$,
88048803
\code{$C$.$v$} is a constant.
88058804
The same is true if $C$ is accessed via a prefix $p$;
88068805
\code{$p$.$C$.$v$} is a constant unless $p$ is a deferred prefix.%
@@ -19315,7 +19314,7 @@ \subsection{Local Variable Declaration}
1931519314
}
1931619315

1931719316
\LMHash{}%
19318-
Let $D$ be a \LATE{} and \FINAL{} local variable declaration
19317+
Let $D$ be a \LATE{} and final local variable declaration
1931919318
that declares a variable $v$.
1932019319
If an object $o$ is assigned to $v$
1932119320
in a situation where $v$ is unbound
@@ -19642,7 +19641,7 @@ \subsubsection{For-in}
1964219641
It follows that it is a compile-time error
1964319642
% The following error exists also in the case where \id{} is definitely
1964419643
% unassigned before the loop: The loop could run >1 time.
19645-
if $D$ is empty and \id{} is a final variable.
19644+
if $D$ is empty and \id{} is a final or constant variable.
1964619645
Also, it is a dynamic error if $e$ has type \DYNAMIC,
1964719646
but $e$ evaluates to an instance of a type
1964819647
which is not a subtype of \code{Iterable<Object?>}.%

0 commit comments

Comments
 (0)