@@ -5325,7 +5325,7 @@ \subsection{Combined Member Signatures}
5325
5325
the combined member signature is $m'$.
5326
5326
5327
5327
\LMHash{}%
5328
- \BlindDefineSymbol{m_j,q}
5328
+ \BlindDefineSymbol{m_j, q}%
5329
5329
Otherwise, $M_0$ contains more than one member signature named $n$.
5330
5330
Let \List{m}{1}{q} be those member signatures.
5331
5331
@@ -7461,7 +7461,7 @@ \subsection{Super-Bounded Types}
7461
7461
}
7462
7462
7463
7463
\LMHash{}%
7464
- \BlindDefineSymbol{T,T_j,s}%
7464
+ \BlindDefineSymbol{T, T_j, s}%
7465
7465
Let $T$ be a parameterized type of the form \code{$G$<\List{T}{1}{s}>}
7466
7466
where $G$ denotes a generic class or a generic type alias.
7467
7467
$T$ is \Index{super-bounded} if{}f the following conditions are both true:
@@ -7870,7 +7870,7 @@ \subsubsection{The Instantiation to Bound Algorithm}
7870
7870
We now specify how the
7871
7871
\Index{instantiation to bound}
7872
7872
algorithm proceeds.
7873
- \BlindDefineSymbol{T,X_j,k, B_j,S_j}%
7873
+ \BlindDefineSymbol{T, X_j, k, B_j, S_j}%
7874
7874
Let $T$ be a raw type.
7875
7875
Let \List{X}{1}{k} be the formal type parameters in the declaration of $G$,
7876
7876
and let \List{B}{1}{k} be their bounds.
@@ -10175,7 +10175,7 @@ \subsubsection{List Literal Inference}
10175
10175
the element type of \metavar{list} as a whole.
10176
10176
10177
10177
\LMHash{}%
10178
- \BlindDefineSymbol{P, P_e}
10178
+ \BlindDefineSymbol{P, P_e}%
10179
10179
The context type $P$
10180
10180
(\ref{setAndMapLiteralDisambiguation})
10181
10181
for each element of \metavar{list} is
@@ -10304,7 +10304,7 @@ \subsubsection{List Literal Inference}
10304
10304
\IndexCustom{type inference on a list literal}{%
10305
10305
type inference!list literal}
10306
10306
as a whole.
10307
- \BlindDefineSymbol{\metavar{list},\ell_j,P}%
10307
+ \BlindDefineSymbol{\metavar{list}, \ell_j, P}%
10308
10308
Assume that \metavar{list} is derived from \synt{listLiteral}
10309
10309
and contains the elements \List{\ell}{1}{n},
10310
10310
and the context type for \metavar{list} is $P$.
@@ -10539,7 +10539,7 @@ \subsubsection{Set and Map Literal Disambiguation}
10539
10539
(\ref{setAndMapLiteralInference}).
10540
10540
10541
10541
\LMHash{}%
10542
- \BlindDefineSymbol{e,{\cal L},C}%
10542
+ \BlindDefineSymbol{e, {\cal L}, C}%
10543
10543
Let $e$ be a \synt{setOrMapLiteral}
10544
10544
with leaf elements $\cal L$ and context type $C$.
10545
10545
If $C$ is \FreeContext{} then let $S$ be undefined.
@@ -10674,7 +10674,7 @@ \subsubsection{Set and Map Literal Inference}
10674
10674
\end{dartCode}
10675
10675
10676
10676
\LMHash{}%
10677
- \BlindDefineSymbol{\metavar{collection},P}%
10677
+ \BlindDefineSymbol{\metavar{collection}, P}%
10678
10678
Let \metavar{collection} be a collection literal
10679
10679
derived from \synt{setOrMapLiteral}.
10680
10680
The inferred type of an \synt{element} is an element type $T$,
@@ -10715,7 +10715,7 @@ \subsubsection{Set and Map Literal Inference}
10715
10715
provides a partial constraint on the inferred type.%
10716
10716
}
10717
10717
\item
10718
- \BlindDefineSymbol{P_k,P_v}%
10718
+ \BlindDefineSymbol{P_k, P_v}%
10719
10719
If \metavar{collection} is unambiguously a map
10720
10720
then $P$ is \code{Map<$P_k$,\,\,$P_v$>}
10721
10721
where $P_k$ and $P_v$ are determined by downwards inference,
@@ -10906,7 +10906,7 @@ \subsubsection{Set and Map Literal Inference}
10906
10906
10907
10907
\LMHash{}%
10908
10908
\Case{If element}
10909
- \BlindDefineSymbol{b,\ell_1,\ell_2}%
10909
+ \BlindDefineSymbol{b, \ell_1, \ell_2}%
10910
10910
In this case $\ell$ is of the form
10911
10911
\code{\IF\,\,($b$)\,\,$\ell_1$} or
10912
10912
\code{\IF\,\,($b$)\,\,$\ell_1$\,\,\ELSE\,\,$\ell_2$}.
@@ -10958,7 +10958,7 @@ \subsubsection{Set and Map Literal Inference}
10958
10958
10959
10959
\LMHash{}%
10960
10960
\Case{For element}
10961
- \BlindDefineSymbol{p,\ell_1}%
10961
+ \BlindDefineSymbol{p, \ell_1}%
10962
10962
In this case $\ell$ is of the form
10963
10963
\code{\AWAIT?\,\,\FOR\,\,($p$)\,\,$\ell_1$}
10964
10964
where $p$ is derived from \synt{forLoopParts} and
@@ -11007,7 +11007,7 @@ \subsubsection{Set and Map Literal Inference}
11007
11007
\IndexCustom{type inference on a set or map literal}{%
11008
11008
type inference!set or map literal}
11009
11009
as a whole.
11010
- \BlindDefineSymbol{\metavar{collection},P}%
11010
+ \BlindDefineSymbol{\metavar{collection}, P}%
11011
11011
Assume that \metavar{collection} is derived from \synt{setOrMapLiteral},
11012
11012
and the context type for \metavar{collection} is $P$.
11013
11013
@@ -13365,9 +13365,9 @@ \subsection{Generic Function Instantiation}
13365
13365
}
13366
13366
13367
13367
\LMHash{}%
13368
- \BlindDefineSymbol{f,G}
13368
+ \BlindDefineSymbol{f, G}
13369
13369
Let $f$ be an expression whose static type $G$ is
13370
- \BlindDefineSymbol{T_0,X_j,B_j,s, p}%
13370
+ \BlindDefineSymbol{T_0, X_j, B_j, s, p}%
13371
13371
a generic function type of the form
13372
13372
\RawFunctionType{T_0}{X}{B}{s}{\metavar{p}}
13373
13373
where \code{($p$)} is derived from \synt{formalParameterList}.
@@ -13915,7 +13915,7 @@ \subsubsection{Ordinary Invocation}
13915
13915
Consider a
13916
13916
\IndexCustom{conditional ordinary method invocation}{%
13917
13917
method invocation!conditional ordinary}
13918
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
13918
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
13919
13919
$i$ of the form
13920
13920
13921
13921
\noindent
@@ -13966,7 +13966,7 @@ \subsubsection{Ordinary Invocation}
13966
13966
\Case{\code{$C$.$m$<$\cdots$>($\cdots$)}}
13967
13967
A \IndexCustom{static member invocation}{member invocation!static}
13968
13968
$i$ is an invocation of the form
13969
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
13969
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
13970
13970
\code{%
13971
13971
$C$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
13972
13972
where $C$ is a term derived from \synt{typeName}
@@ -14003,7 +14003,7 @@ \subsubsection{Ordinary Invocation}
14003
14003
The static type of $i$ is as specified there.
14004
14004
14005
14005
\LMHash{}%
14006
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14006
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14007
14007
Evaluation of a static method invocation $i$ of the form
14008
14008
14009
14009
\noindent
@@ -14035,7 +14035,7 @@ \subsubsection{Ordinary Invocation}
14035
14035
\Case{\code{$e$.$m$<$\cdots$>($\cdots$)}}
14036
14036
An \IndexCustom{unconditional ordinary method invocation}{%
14037
14037
method invocation!unconditional ordinary}
14038
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14038
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14039
14039
$i$ is of the form
14040
14040
\code{%
14041
14041
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
@@ -14095,7 +14095,7 @@ \subsubsection{Ordinary Invocation}
14095
14095
}).
14096
14096
14097
14097
\LMHash{}%
14098
- \BlindDefineSymbol{L,d, F}%
14098
+ \BlindDefineSymbol{L, d, F}%
14099
14099
Otherwise \code{$T$.$m$} denotes an instance member.
14100
14100
Let $L$ be the library that contains $i$.
14101
14101
Let $d$ be the result of method lookup for $m$ in $T$ with respect to $L$,
@@ -14165,13 +14165,13 @@ \subsubsection{Ordinary Invocation}
14165
14165
14166
14166
\LMHash{}%
14167
14167
Evaluation of an unconditional ordinary method invocation $i$ of the form
14168
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14168
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14169
14169
\code{%
14170
14170
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)}
14171
14171
proceeds as follows:
14172
14172
14173
14173
\LMHash{}%
14174
- \BlindDefineSymbol{o,f}%
14174
+ \BlindDefineSymbol{o, f}%
14175
14175
First, the expression $e$ is evaluated to an object $o$.
14176
14176
Let $f$ be the result of looking up
14177
14177
(\ref{lookup})
@@ -14528,7 +14528,7 @@ \subsection{Property Extraction}
14528
14528
\Case{Conditional}
14529
14529
Consider a \IndexCustom{conditional property extraction expression}{%
14530
14530
property extraction!conditional}
14531
- \BlindDefineSymbol{i,e, \id}%
14531
+ \BlindDefineSymbol{i, e, \id}%
14532
14532
$i$ of the form \code{$e$?.\id}.
14533
14533
14534
14534
%% TODO(eernst): We are likely to decide that this is an error.
@@ -14555,7 +14555,7 @@ \subsection{Property Extraction}
14555
14555
14556
14556
\LMHash{}%
14557
14557
\Case{Static}
14558
- \BlindDefineSymbol{i,C, \id}%
14558
+ \BlindDefineSymbol{i, C, \id}%
14559
14559
Let \id{} be an identifier;
14560
14560
a \IndexCustom{static property extraction}{%
14561
14561
property extraction!static}
@@ -14620,7 +14620,9 @@ \subsection{Property Extraction}
14620
14620
(\ref{functionClosurization})
14621
14621
by desugaring it to a method closurization on \CALL.
14622
14622
This only occurs when it is statically known that it is a callable object,
14623
- and when the context type requires a function.%
14623
+ and when the context type requires a function.
14624
+ Note that the static type of $e$ can not be potentially nullable,
14625
+ because no such types have a method named \CALL.%
14624
14626
}
14625
14627
\EndCase
14626
14628
@@ -16935,7 +16937,7 @@ \subsection{Lexical Lookup}
16935
16937
}
16936
16938
16937
16939
\LMHash{}%
16938
- \BlindDefineSymbol{n, id}%
16940
+ \BlindDefineSymbol{n, \ id}%
16939
16941
Consider the situation where a name $n$
16940
16942
has basename \id{}
16941
16943
(\ref{classMemberConflicts})
@@ -18884,7 +18886,7 @@ \subsection{Return}
18884
18886
to be \FutureValueTypeOf{$T$}.
18885
18887
18886
18888
\LMHash{}%
18887
- \BlindDefineSymbol{s,e,S,f, T}%
18889
+ \BlindDefineSymbol{s, e, S, f, T}%
18888
18890
Consider a return statement $s$ of the form \code{\RETURN\,\,$e$?;}.
18889
18891
Let $S$ be the static type of $e$, if $e$ is present,
18890
18892
let $f$ be the immediately enclosing function,
@@ -19020,7 +19022,7 @@ \subsection{Return}
19020
19022
\LMHash{}%
19021
19023
\Case{Synchronous non-generator functions and factory constructors}
19022
19024
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19023
- \BlindDefineSymbol{s,e, f}%
19025
+ \BlindDefineSymbol{s, e, f}%
19024
19026
Let $f$ be the immediately enclosing function,
19025
19027
and consider the case where $f$ is a synchronous non-generator
19026
19028
or a factory constructor.
@@ -19042,7 +19044,7 @@ \subsection{Return}
19042
19044
\LMHash{}%
19043
19045
\Case{Asynchronous non-generator functions}
19044
19046
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19045
- \BlindDefineSymbol{s,e,f, T_v}%
19047
+ \BlindDefineSymbol{s, e, f, T_v}%
19046
19048
Let $f$ be the immediately enclosing function,
19047
19049
and consider the case where $f$ is an asynchronous non-generator
19048
19050
with future value type $T_v$.
@@ -22266,7 +22268,7 @@ \subsection{Type Normalization}
22266
22268
22267
22269
\LMHash{}%
22268
22270
The function \Index{\NormalizedTypeOfName} is then defined as follows:
22269
- \BlindDefineSymbol{T_a,T_u,T_r}%
22271
+ \BlindDefineSymbol{T_a, T_u, T_r}%
22270
22272
Let $T_a$ be a type
22271
22273
(\commentary{where `a' stands for `argument'}).
22272
22274
Let $T_u$ be the transitive alias expansion of $T_a$
@@ -22401,7 +22403,7 @@ \subsection{Least and Greatest Closure of Types}
22401
22403
}
22402
22404
22403
22405
\LMHash{}%
22404
- \BlindDefineSymbol{S,L, X_j,n}%
22406
+ \BlindDefineSymbol{S, L, X_j, n}%
22405
22407
Let $S$ be a type and $L$ a set of type variables of the form
22406
22408
$\{\List{X}{1}{n}\}$.
22407
22409
@@ -24019,26 +24021,11 @@ \subsubsection{Const type variable elimination}
24019
24021
\}
24020
24022
\end{dartCode}
24021
24023
24022
- \subsubsection{Implicit conversions}
24023
-
24024
- !!!TODO!!!
24025
-
24026
- Implicit tear-off conversion is not performed on objects of nullable type,
24027
- regardless of the context type. For example:
24028
-
24029
- \begin{dartCode}
24030
- \CLASS\ C \{
24031
- int call() \{\}
24032
- \}
24033
- \VOID\ main() \{
24034
- int \FUNCTION()? c0 = \NEW\ C(); // Ok
24035
- int \FUNCTION()? c0 = (null \AS\ C?); // static error
24036
- int \FUNCTION() c1 = (null \AS\ C?); // static error
24037
- \}
24038
- \end{dartCode}
24039
24024
24040
24025
\subsubsection{Constant Objects}
24041
24026
24027
+ !!!TODO!!!
24028
+
24042
24029
The definition of potentially constant expressions is extended to include type
24043
24030
casts and instance checks on potentially constant types, as follows.
24044
24031
0 commit comments