Skip to content

Commit d77bdbd

Browse files
committed
Post-rebase error correction
1 parent 5ac887e commit d77bdbd

File tree

1 file changed

+31
-45
lines changed

1 file changed

+31
-45
lines changed

specification/dartLangSpec.tex

Lines changed: 31 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@
2626
% CHANGES
2727
% =======
2828
%
29-
% Significant changes to the specification. Note that the versions specified
30-
% below indicate the current tool chain version when those changes were made.
31-
% In practice, new features have always been integrated into the language
32-
% specification (this document) a while after the change was accepted into
33-
% the language and implemented. As of September 2022, the upcoming version of
34-
% the language which is being specified is indicated by a version number in
35-
% parentheses after the tool chain version.
29+
% Significant changes to the specification.
3630
%
3731
% Note that the version numbers used below (up to 2.15) were associated with
3832
% the currently released language and tools at the time of the spec change,
@@ -837,7 +831,7 @@ \section{Notation}
837831
Type inference of $e_j$ and the context type used for inference of $e_j$
838832
are not relevant.
839833
It is generally assumed that type inference has occurred already
840-
(\ref{overview}).%
834+
(\ref{typeInference}).%
841835
}
842836

843837
\LMHash{}%
@@ -1454,13 +1448,6 @@ \section{Variables}
14541448
That is, any kind of variable which is not a local variable.%
14551449
}
14561450

1457-
\LMHash{}%
1458-
A \IndexCustom{non-local variable}{variable!non-local}
1459-
is a library variable, a class variable, or an instance variable.
1460-
\commentary{%
1461-
That is, any kind of variable which is not a local variable.%
1462-
}
1463-
14641451
\LMHash{}%
14651452
A \IndexCustom{constant variable}{variable!constant}
14661453
is a variable whose declaration includes the modifier \CONST.
@@ -1496,15 +1483,12 @@ \section{Variables}
14961483
\subsection{Implicitly Induced Getters and Setters}
14971484
\LMLabel{implicitlyInducedGettersAndSetters}
14981485

1499-
%% TODO(eernst): When inference is specified, we should be able to conclude
1500-
%% that the cases with no declared type do not exist after type inference
1501-
%% (for instance `var x;` or `var x = e;`), and then we can replace all rules
1502-
%% about such cases by commentary saying that they may exist in the input,
1503-
%% but they are gone after type inference.
1504-
%%
1505-
%% At this time we rely on the assumption that type inference has already
1506-
%% occurred, which means that we can refer to the declared type of a variable
1507-
%% without mentioning type inference.
1486+
%% TODO(eernst): We treat type inference as a step that has already
1487+
%% taken place. We consider the types chosen by type inference to
1488+
%% be available as a kind of semantic attributes of the syntax.
1489+
%% That is, we can refer to the inferred type and say that the
1490+
%% given declaration has the inferred type. In this way we avoid
1491+
%% talking about an actual syntactic transformation.
15081492

15091493
\LMHash{}%
15101494
The following rules on implicitly induced getters and setters
@@ -1550,7 +1534,8 @@ \subsection{Implicitly Induced Getters and Setters}
15501534

15511535
\noindent
15521536
implicitly induces a getter with the header that
1553-
contains \STATIC{} if{}f the declaration contains \STATIC{} and is followed by
1537+
contains \STATIC{} if{}f the declaration contains \STATIC,
1538+
and is followed by
15541539
\code{$T$\,\,\GET\,\,\id},
15551540
where $T$ is obtained from type inference
15561541
in the case where $e$ exists,
@@ -1593,7 +1578,7 @@ \subsection{Implicitly Induced Getters and Setters}
15931578
\code{\VOID\,\,\SET\,\,\id($T$\,\,$x$)},
15941579
whose execution sets the value of \id{} to the incoming argument $x$.
15951580
The type $T$ is obtained from type inference
1596-
(\ref{overview}).
1581+
(\ref{typeInference}).
15971582
\EndCase
15981583

15991584
\LMHash{}%
@@ -1606,10 +1591,10 @@ \subsection{Implicitly Induced Getters and Setters}
16061591

16071592
\commentary{%
16081593
Type inference has not yet been specified in this document
1609-
(\ref{overview}).
1610-
Note that type inference could change, e.g.,
1611-
\code{\VAR\,\,x;} to \code{$T$\,\,x;},
1612-
which would take us to an earlier case.%
1594+
(\ref{typeInference}).
1595+
Note that type inference could provide, e.g.,
1596+
\code{\VAR\,\,x;} with an inferred type $T$,
1597+
which is then the declared type of the variable.%
16131598
}
16141599
\EndCase
16151600

@@ -1618,7 +1603,7 @@ \subsection{Implicitly Induced Getters and Setters}
16181603
A variable declaration of the form
16191604
\code{\STATIC?\,\,\LATE\,\,\FINAL\,\,$T$\,\,\id;}
16201605
implicitly induces a setter (\ref{setters}) with the header
1621-
\code{\VOID\,\,\SET\,\,\id(\DYNAMIC\,\,$x$)}.
1606+
\code{\VOID\,\,\SET\,\,\id($T$\,\,$x$)}.
16221607
If this setter is executed
16231608
in a situation where the variable \id{} has not been bound,
16241609
it will bind \id{} to the object that $x$ is bound to.
@@ -2017,9 +2002,6 @@ \subsection{Evaluation of Implicit Variable Getters}
20172002
% Reduce whitespace after itemized list: This is just an end symbol.
20182003
\vspace{-\baselineskip}\EndCase
20192004

2020-
% Reduce whitespace after itemized list: This is just an end symbol.
2021-
\vspace{-\baselineskip}\EndCase
2022-
20232005

20242006
\section{Functions}
20252007
\LMLabel{functions}
@@ -5220,14 +5202,14 @@ \subsubsection{Inheritance and Overriding}
52205202
The controlling language is in the relevant sections of the specification.
52215203

52225204
\begin{enumerate}
5205+
52235206
\item There is only one namespace
52245207
for getters, setters, methods and constructors (\ref{scoping}).
5225-
A non-local variable $f$ introduces a getter $f$,
5226-
and a non-local variable $f$
5227-
also introduces a setter
5208+
A non-local variable $f$ introduces a getter $f$.
5209+
A non-local variable $f$ also introduces a setter \code{$f$=}
52285210
if it is not final and not constant,
52295211
or it is late and final and has no initializing expression
5230-
\code{$f$=} (\ref{instanceVariables}, \ref{variables}).
5212+
(\ref{instanceVariables}, \ref{variables}).
52315213
When we speak of members here, we mean
52325214
accessible instance, static, or library variables,
52335215
getters, setters, and methods
@@ -8822,7 +8804,7 @@ \subsection{Constants}
88228804
that is not qualified by a deferred prefix,
88238805
is a potentially constant and constant expression.
88248806
\commentary{%
8825-
For example, if class $C$ declares a constant class variable $v$,
8807+
For example, if class $C$ declares a constant class variable $v$, !!!TODO!!!
88268808
\code{$C$.$v$} is a constant.
88278809
The same is true if $C$ is accessed via a prefix $p$;
88288810
\code{$p$.$C$.$v$} is a constant unless $p$ is a deferred prefix.%
@@ -12543,7 +12525,7 @@ \subsection{This}
1254312525

1254412526
\LMHash{}%
1254512527
The static type of \THIS{} is the interface of the
12546-
immediately enclosing class, enum, or mixin, if any.
12528+
immediately enclosing class, mixin, or enum, if any.
1254712529
The static type of \THIS{} is
1254812530
the \ON{} type of the enclosing extension, if any
1254912531
(\ref{extensions}).
@@ -16625,7 +16607,7 @@ \subsection{Assignment}
1662516607

1662616608
\LMHash{}%
1662716609
An assignment changes the value associated with a variable,
16628-
or invokes a setter.
16610+
or it invokes a setter.
1662916611

1663016612
\begin{grammar}
1663116613
<assignmentOperator> ::= `='
@@ -19117,7 +19099,8 @@ \subsection{Local Variable Declaration}
1911719099

1911819100
\LMHash{}%
1911919101
The properties of being
19120-
\IndexCustom{initialized}{variable!initialized} or
19102+
\IndexCustom{initialized}{variable!initialized},
19103+
\IndexCustom{final}{variable!final}, or
1912119104
\IndexCustom{constant}{variable!constant}
1912219105
apply to local variables with the same definitions as for other variables
1912319106
(\ref{variables}).
@@ -19209,7 +19192,7 @@ \subsection{Local Variable Declaration}
1920919192

1921019193
In every situation which is not covered by the previous paragraph,
1921119194
it is a compile-time error to assign to a local variable
19212-
which is \FINAL{} and not \LATE{}
19195+
which is final and not late
1921319196
(\ref{assignment}).%
1921419197
}
1921519198

@@ -22478,10 +22461,13 @@ \subsection{Dynamic Type System}
2247822461
}
2247922462

2248022463
\LMHash{}%
22481-
An expression is a \emph{type literal} if it is an identifier,
22464+
An expression is a \Index{type literal} if it is an identifier,
2248222465
or a qualified identifier,
2248322466
which denotes a class, mixin, enum, or type alias declaration, or it is
22484-
an identifier denoting a type parameter of a generic class or function.
22467+
an identifier denoting a type parameter of a generic class or function,
22468+
or it is an identifier or qualified identifier which is a type literal
22469+
and which is followed by a list of actual type arguments
22470+
derived from \synt{typeArguments}.
2248522471
It is a \emph{constant type literal} if it does not denote a type parameter,
2248622472
and it is not qualified by a deferred prefix.
2248722473
\commentary{%

0 commit comments

Comments
 (0)