Skip to content

Commit 6069fac

Browse files
committed
Post-rebase error correction
1 parent 2e5cfda commit 6069fac

File tree

1 file changed

+30
-45
lines changed

1 file changed

+30
-45
lines changed

specification/dartLangSpec.tex

Lines changed: 30 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,
@@ -778,7 +772,7 @@ \section{Notation}
778772
Type inference of $e_j$ and the context type used for inference of $e_j$
779773
are not relevant.
780774
It is generally assumed that type inference has occurred already
781-
(\ref{overview}).%
775+
(\ref{typeInference}).%
782776
}
783777

784778
\LMHash{}%
@@ -1392,13 +1386,6 @@ \section{Variables}
13921386
That is, any kind of variable which is not a local variable.%
13931387
}
13941388

1395-
\LMHash{}%
1396-
A \IndexCustom{non-local variable}{variable!non-local}
1397-
is a library variable, a class variable, or an instance variable.
1398-
\commentary{%
1399-
That is, any kind of variable which is not a local variable.%
1400-
}
1401-
14021389
\LMHash{}%
14031390
A \IndexCustom{constant variable}{variable!constant}
14041391
is a variable whose declaration includes the modifier \CONST.
@@ -1436,15 +1423,12 @@ \section{Variables}
14361423
\subsection{Implicitly Induced Getters and Setters}
14371424
\LMLabel{implicitlyInducedGettersAndSetters}
14381425

1439-
%% TODO(eernst): When inference is specified, we should be able to conclude
1440-
%% that the cases with no declared type do not exist after type inference
1441-
%% (for instance `var x;` or `var x = e;`), and then we can replace all rules
1442-
%% about such cases by commentary saying that they may exist in the input,
1443-
%% but they are gone after type inference.
1444-
%%
1445-
%% At this time we rely on the assumption that type inference has already
1446-
%% occurred, which means that we can refer to the declared type of a variable
1447-
%% without mentioning type inference.
1426+
%% TODO(eernst): We treat type inference as a step that has already
1427+
%% taken place. We consider the types chosen by type inference to
1428+
%% be available as a kind of semantic attributes of the syntax.
1429+
%% That is, we can refer to the inferred type and say that the
1430+
%% given declaration has the inferred type. In this way we avoid
1431+
%% talking about an actual syntactic transformation.
14481432

14491433
\LMHash{}%
14501434
The following rules on implicitly induced getters and setters
@@ -1490,7 +1474,8 @@ \subsection{Implicitly Induced Getters and Setters}
14901474

14911475
\noindent
14921476
implicitly induces a getter with the header that
1493-
contains \STATIC{} if{}f the declaration contains \STATIC{} and is followed by
1477+
contains \STATIC{} if{}f the declaration contains \STATIC,
1478+
and is followed by
14941479
\code{$T$\,\,\GET\,\,\id},
14951480
where $T$ is obtained from type inference
14961481
in the case where $e$ exists,
@@ -1533,7 +1518,7 @@ \subsection{Implicitly Induced Getters and Setters}
15331518
\code{\VOID\,\,\SET\,\,\id($T$\,\,$x$)},
15341519
whose execution sets the value of \id{} to the incoming argument $x$.
15351520
The type $T$ is obtained from type inference
1536-
(\ref{overview}).
1521+
(\ref{typeInference}).
15371522
\EndCase
15381523

15391524
\LMHash{}%
@@ -1546,10 +1531,10 @@ \subsection{Implicitly Induced Getters and Setters}
15461531

15471532
\commentary{%
15481533
Type inference has not yet been specified in this document
1549-
(\ref{overview}).
1550-
Note that type inference could change, e.g.,
1551-
\code{\VAR\,\,x;} to \code{$T$\,\,x;},
1552-
which would take us to an earlier case.%
1534+
(\ref{typeInference}).
1535+
Note that type inference could provide, e.g.,
1536+
\code{\VAR\,\,x;} with an inferred type $T$,
1537+
which is then the declared type of the variable.%
15531538
}
15541539
\EndCase
15551540

@@ -1558,7 +1543,7 @@ \subsection{Implicitly Induced Getters and Setters}
15581543
A variable declaration of the form
15591544
\code{\STATIC?\,\,\LATE\,\,\FINAL\,\,$T$\,\,\id;}
15601545
implicitly induces a setter (\ref{setters}) with the header
1561-
\code{\VOID\,\,\SET\,\,\id(\DYNAMIC\,\,$x$)}.
1546+
\code{\VOID\,\,\SET\,\,\id($T$\,\,$x$)}.
15621547
If this setter is executed
15631548
in a situation where the variable \id{} has not been bound,
15641549
it will bind \id{} to the object that $x$ is bound to.
@@ -1956,9 +1941,6 @@ \subsection{Evaluation of Implicit Variable Getters}
19561941
% Reduce whitespace after itemized list: This is just an end symbol.
19571942
\vspace{-\baselineskip}\EndCase
19581943

1959-
% Reduce whitespace after itemized list: This is just an end symbol.
1960-
\vspace{-\baselineskip}\EndCase
1961-
19621944

19631945
\section{Functions}
19641946
\LMLabel{functions}
@@ -5104,12 +5086,11 @@ \subsubsection{Inheritance and Overriding}
51045086

51055087
\item There is only one namespace
51065088
for getters, setters, methods and constructors (\ref{scoping}).
5107-
A non-local variable $f$ introduces a getter $f$,
5108-
and a non-local variable $f$
5109-
also introduces a setter
5089+
A non-local variable $f$ introduces a getter $f$.
5090+
A non-local variable $f$ also introduces a setter \code{$f$=}
51105091
if it is not final and not constant,
51115092
or it is late and final and has no initializing expression
5112-
\code{$f$=} (\ref{instanceVariables}, \ref{variables}).
5093+
(\ref{instanceVariables}, \ref{variables}).
51135094
When we speak of members here, we mean
51145095
accessible instance, static, or library variables,
51155096
getters, setters, and methods
@@ -8643,7 +8624,7 @@ \subsection{Constants}
86438624
that is not qualified by a deferred prefix,
86448625
is a potentially constant and constant expression.
86458626
\commentary{%
8646-
For example, if class $C$ declares a constant class variable $v$,
8627+
For example, if class $C$ declares a constant class variable $v$, !!!TODO!!!
86478628
\code{$C$.$v$} is a constant.
86488629
The same is true if $C$ is accessed via a prefix $p$;
86498630
\code{$p$.$C$.$v$} is a constant unless $p$ is a deferred prefix.%
@@ -12270,7 +12251,7 @@ \subsection{This}
1227012251

1227112252
\LMHash{}%
1227212253
The static type of \THIS{} is the interface of the
12273-
immediately enclosing class, enum, or mixin, if any.
12254+
immediately enclosing class, mixin, or enum, if any.
1227412255
The static type of \THIS{} is
1227512256
the \ON{} type of the enclosing extension, if any
1227612257
(\ref{extensions}).
@@ -16291,7 +16272,7 @@ \subsection{Assignment}
1629116272

1629216273
\LMHash{}%
1629316274
An assignment changes the value associated with a variable,
16294-
or invokes a setter.
16275+
or it invokes a setter.
1629516276

1629616277
\begin{grammar}
1629716278
<assignmentOperator> ::= `='
@@ -18756,7 +18737,8 @@ \subsection{Local Variable Declaration}
1875618737

1875718738
\LMHash{}%
1875818739
The properties of being
18759-
\IndexCustom{initialized}{variable!initialized} or
18740+
\IndexCustom{initialized}{variable!initialized},
18741+
\IndexCustom{final}{variable!final}, or
1876018742
\IndexCustom{constant}{variable!constant}
1876118743
apply to local variables with the same definitions as for other variables
1876218744
(\ref{variables}).
@@ -18848,7 +18830,7 @@ \subsection{Local Variable Declaration}
1884818830

1884918831
In every situation which is not covered by the previous paragraph,
1885018832
it is a compile-time error to assign to a local variable
18851-
which is \FINAL{} and not \LATE{}
18833+
which is final and not late
1885218834
(\ref{assignment}).%
1885318835
}
1885418836

@@ -22025,10 +22007,13 @@ \subsection{Dynamic Type System}
2202522007
}
2202622008

2202722009
\LMHash{}%
22028-
An expression is a \emph{type literal} if it is an identifier,
22010+
An expression is a \Index{type literal} if it is an identifier,
2202922011
or a qualified identifier,
2203022012
which denotes a class, mixin, enum, or type alias declaration, or it is
22031-
an identifier denoting a type parameter of a generic class or function.
22013+
an identifier denoting a type parameter of a generic class or function,
22014+
or it is an identifier or qualified identifier which is a type literal
22015+
and which is followed by a list of actual type arguments
22016+
derived from \synt{typeArguments}.
2203222017
It is a \emph{constant type literal} if it does not denote a type parameter,
2203322018
and it is not qualified by a deferred prefix.
2203422019
\commentary{%

0 commit comments

Comments
 (0)