@@ -5372,7 +5372,7 @@ \subsection{Combined Member Signatures}
5372
5372
the combined member signature is $m'$.
5373
5373
5374
5374
\LMHash{}%
5375
- \BlindDefineSymbol{m_j,q}
5375
+ \BlindDefineSymbol{m_j, q}%
5376
5376
Otherwise, $M_0$ contains more than one member signature named $n$.
5377
5377
Let \List{m}{1}{q} be those member signatures.
5378
5378
@@ -7508,7 +7508,7 @@ \subsection{Super-Bounded Types}
7508
7508
}
7509
7509
7510
7510
\LMHash{}%
7511
- \BlindDefineSymbol{T,T_j,s}%
7511
+ \BlindDefineSymbol{T, T_j, s}%
7512
7512
Let $T$ be a parameterized type of the form \code{$G$<\List{T}{1}{s}>}
7513
7513
where $G$ denotes a generic class or a generic type alias.
7514
7514
$T$ is \Index{super-bounded} if{}f the following conditions are both true:
@@ -7917,7 +7917,7 @@ \subsubsection{The Instantiation to Bound Algorithm}
7917
7917
We now specify how the
7918
7918
\Index{instantiation to bound}
7919
7919
algorithm proceeds.
7920
- \BlindDefineSymbol{T,X_j,k, B_j,S_j}%
7920
+ \BlindDefineSymbol{T, X_j, k, B_j, S_j}%
7921
7921
Let $T$ be a raw type.
7922
7922
Let \List{X}{1}{k} be the formal type parameters in the declaration of $G$,
7923
7923
and let \List{B}{1}{k} be their bounds.
@@ -10243,7 +10243,7 @@ \subsubsection{List Literal Inference}
10243
10243
the element type of \metavar{list} as a whole.
10244
10244
10245
10245
\LMHash{}%
10246
- \BlindDefineSymbol{P, P_e}
10246
+ \BlindDefineSymbol{P, P_e}%
10247
10247
The context type $P$
10248
10248
(\ref{setAndMapLiteralDisambiguation})
10249
10249
for each element of \metavar{list} is
@@ -10372,7 +10372,7 @@ \subsubsection{List Literal Inference}
10372
10372
\IndexCustom{type inference on a list literal}{%
10373
10373
type inference!list literal}
10374
10374
as a whole.
10375
- \BlindDefineSymbol{\metavar{list},\ell_j,P}%
10375
+ \BlindDefineSymbol{\metavar{list}, \ell_j, P}%
10376
10376
Assume that \metavar{list} is derived from \synt{listLiteral}
10377
10377
and contains the elements \List{\ell}{1}{n},
10378
10378
and the context type for \metavar{list} is $P$.
@@ -10607,7 +10607,7 @@ \subsubsection{Set and Map Literal Disambiguation}
10607
10607
(\ref{setAndMapLiteralInference}).
10608
10608
10609
10609
\LMHash{}%
10610
- \BlindDefineSymbol{e,{\cal L},C}%
10610
+ \BlindDefineSymbol{e, {\cal L}, C}%
10611
10611
Let $e$ be a \synt{setOrMapLiteral}
10612
10612
with leaf elements $\cal L$ and context type $C$.
10613
10613
If $C$ is \FreeContext{} then let $S$ be undefined.
@@ -10742,7 +10742,7 @@ \subsubsection{Set and Map Literal Inference}
10742
10742
\end{dartCode}
10743
10743
10744
10744
\LMHash{}%
10745
- \BlindDefineSymbol{\metavar{collection},P}%
10745
+ \BlindDefineSymbol{\metavar{collection}, P}%
10746
10746
Let \metavar{collection} be a collection literal
10747
10747
derived from \synt{setOrMapLiteral}.
10748
10748
The inferred type of an \synt{element} is an element type $T$,
@@ -10783,7 +10783,7 @@ \subsubsection{Set and Map Literal Inference}
10783
10783
provides a partial constraint on the inferred type.%
10784
10784
}
10785
10785
\item
10786
- \BlindDefineSymbol{P_k,P_v}%
10786
+ \BlindDefineSymbol{P_k, P_v}%
10787
10787
If \metavar{collection} is unambiguously a map
10788
10788
then $P$ is \code{Map<$P_k$,\,\,$P_v$>}
10789
10789
where $P_k$ and $P_v$ are determined by downwards inference,
@@ -10974,7 +10974,7 @@ \subsubsection{Set and Map Literal Inference}
10974
10974
10975
10975
\LMHash{}%
10976
10976
\Case{If element}
10977
- \BlindDefineSymbol{b,\ell_1,\ell_2}%
10977
+ \BlindDefineSymbol{b, \ell_1, \ell_2}%
10978
10978
In this case $\ell$ is of the form
10979
10979
\code{\IF\,\,($b$)\,\,$\ell_1$} or
10980
10980
\code{\IF\,\,($b$)\,\,$\ell_1$\,\,\ELSE\,\,$\ell_2$}.
@@ -11026,7 +11026,7 @@ \subsubsection{Set and Map Literal Inference}
11026
11026
11027
11027
\LMHash{}%
11028
11028
\Case{For element}
11029
- \BlindDefineSymbol{p,\ell_1}%
11029
+ \BlindDefineSymbol{p, \ell_1}%
11030
11030
In this case $\ell$ is of the form
11031
11031
\code{\AWAIT?\,\,\FOR\,\,($p$)\,\,$\ell_1$}
11032
11032
where $p$ is derived from \synt{forLoopParts} and
@@ -11075,7 +11075,7 @@ \subsubsection{Set and Map Literal Inference}
11075
11075
\IndexCustom{type inference on a set or map literal}{%
11076
11076
type inference!set or map literal}
11077
11077
as a whole.
11078
- \BlindDefineSymbol{\metavar{collection},P}%
11078
+ \BlindDefineSymbol{\metavar{collection}, P}%
11079
11079
Assume that \metavar{collection} is derived from \synt{setOrMapLiteral},
11080
11080
and the context type for \metavar{collection} is $P$.
11081
11081
@@ -13465,9 +13465,9 @@ \subsection{Generic Function Instantiation}
13465
13465
}
13466
13466
13467
13467
\LMHash{}%
13468
- \BlindDefineSymbol{f,G}
13468
+ \BlindDefineSymbol{f, G}
13469
13469
Let $f$ be an expression whose static type $G$ is
13470
- \BlindDefineSymbol{T_0,X_j,B_j,s, p}%
13470
+ \BlindDefineSymbol{T_0, X_j, B_j, s, p}%
13471
13471
a generic function type of the form
13472
13472
\RawFunctionType{T_0}{X}{B}{s}{\metavar{p}}
13473
13473
where \code{($p$)} is derived from \synt{formalParameterList}.
@@ -14015,7 +14015,7 @@ \subsubsection{Ordinary Invocation}
14015
14015
Consider a
14016
14016
\IndexCustom{conditional ordinary method invocation}{%
14017
14017
method invocation!conditional ordinary}
14018
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14018
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14019
14019
$i$ of the form
14020
14020
14021
14021
\noindent
@@ -14066,7 +14066,7 @@ \subsubsection{Ordinary Invocation}
14066
14066
\Case{\code{$C$.$m$<$\cdots$>($\cdots$)}}
14067
14067
A \IndexCustom{static member invocation}{member invocation!static}
14068
14068
$i$ is an invocation of the form
14069
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14069
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14070
14070
\code{%
14071
14071
$C$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
14072
14072
where $C$ is a term derived from \synt{typeName}
@@ -14103,7 +14103,7 @@ \subsubsection{Ordinary Invocation}
14103
14103
The static type of $i$ is as specified there.
14104
14104
14105
14105
\LMHash{}%
14106
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14106
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14107
14107
Evaluation of a static method invocation $i$ of the form
14108
14108
14109
14109
\noindent
@@ -14135,7 +14135,7 @@ \subsubsection{Ordinary Invocation}
14135
14135
\Case{\code{$e$.$m$<$\cdots$>($\cdots$)}}
14136
14136
An \IndexCustom{unconditional ordinary method invocation}{%
14137
14137
method invocation!unconditional ordinary}
14138
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14138
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14139
14139
$i$ is of the form
14140
14140
\code{%
14141
14141
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
@@ -14195,7 +14195,7 @@ \subsubsection{Ordinary Invocation}
14195
14195
}).
14196
14196
14197
14197
\LMHash{}%
14198
- \BlindDefineSymbol{L,d, F}%
14198
+ \BlindDefineSymbol{L, d, F}%
14199
14199
Otherwise \code{$T$.$m$} denotes an instance member.
14200
14200
Let $L$ be the library that contains $i$.
14201
14201
Let $d$ be the result of method lookup for $m$ in $T$ with respect to $L$,
@@ -14323,13 +14323,13 @@ \subsubsection{Ordinary Invocation}
14323
14323
14324
14324
\LMHash{}%
14325
14325
Evaluation of an unconditional ordinary method invocation $i$ of the form
14326
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14326
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14327
14327
\code{%
14328
14328
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)}
14329
14329
proceeds as follows:
14330
14330
14331
14331
\LMHash{}%
14332
- \BlindDefineSymbol{o,f}%
14332
+ \BlindDefineSymbol{o, f}%
14333
14333
First, the expression $e$ is evaluated to an object $o$.
14334
14334
Let $f$ be the result of looking up
14335
14335
(\ref{lookup})
@@ -14686,7 +14686,7 @@ \subsection{Property Extraction}
14686
14686
\Case{Conditional}
14687
14687
Consider a \IndexCustom{conditional property extraction expression}{%
14688
14688
property extraction!conditional}
14689
- \BlindDefineSymbol{i,e, \id}%
14689
+ \BlindDefineSymbol{i, e, \id}%
14690
14690
$i$ of the form \code{$e$?.\id}.
14691
14691
14692
14692
%% TODO(eernst): We are likely to decide that this is an error.
@@ -14713,7 +14713,7 @@ \subsection{Property Extraction}
14713
14713
14714
14714
\LMHash{}%
14715
14715
\Case{Static}
14716
- \BlindDefineSymbol{i,C, \id}%
14716
+ \BlindDefineSymbol{i, C, \id}%
14717
14717
Let \id{} be an identifier;
14718
14718
a \IndexCustom{static property extraction}{%
14719
14719
property extraction!static}
@@ -14778,7 +14778,9 @@ \subsection{Property Extraction}
14778
14778
(\ref{functionClosurization})
14779
14779
by desugaring it to a method closurization on \CALL.
14780
14780
This only occurs when it is statically known that it is a callable object,
14781
- and when the context type requires a function.%
14781
+ and when the context type requires a function.
14782
+ Note that the static type of $e$ can not be potentially nullable,
14783
+ because no such types have a method named \CALL.%
14782
14784
}
14783
14785
\EndCase
14784
14786
@@ -17164,7 +17166,7 @@ \subsection{Lexical Lookup}
17164
17166
}
17165
17167
17166
17168
\LMHash{}%
17167
- \BlindDefineSymbol{n, id}%
17169
+ \BlindDefineSymbol{n, \ id}%
17168
17170
Consider the situation where a name $n$
17169
17171
has basename \id{}
17170
17172
(\ref{classMemberConflicts})
@@ -19133,7 +19135,7 @@ \subsection{Return}
19133
19135
to be \FutureValueTypeOf{$T$}.
19134
19136
19135
19137
\LMHash{}%
19136
- \BlindDefineSymbol{s,e,S,f, T}%
19138
+ \BlindDefineSymbol{s, e, S, f, T}%
19137
19139
Consider a return statement $s$ of the form \code{\RETURN\,\,$e$?;}.
19138
19140
Let $S$ be the static type of $e$, if $e$ is present,
19139
19141
let $f$ be the immediately enclosing function,
@@ -19269,7 +19271,7 @@ \subsection{Return}
19269
19271
\LMHash{}%
19270
19272
\Case{Synchronous non-generator functions and factory constructors}
19271
19273
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19272
- \BlindDefineSymbol{s,e, f}%
19274
+ \BlindDefineSymbol{s, e, f}%
19273
19275
Let $f$ be the immediately enclosing function,
19274
19276
and consider the case where $f$ is a synchronous non-generator
19275
19277
or a factory constructor.
@@ -19291,7 +19293,7 @@ \subsection{Return}
19291
19293
\LMHash{}%
19292
19294
\Case{Asynchronous non-generator functions}
19293
19295
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19294
- \BlindDefineSymbol{s,e,f, T_v}%
19296
+ \BlindDefineSymbol{s, e, f, T_v}%
19295
19297
Let $f$ be the immediately enclosing function,
19296
19298
and consider the case where $f$ is an asynchronous non-generator
19297
19299
with future value type $T_v$.
@@ -22531,7 +22533,7 @@ \subsection{Type Normalization}
22531
22533
22532
22534
\LMHash{}%
22533
22535
The function \Index{\NormalizedTypeOfName} is then defined as follows:
22534
- \BlindDefineSymbol{T_a,T_u,T_r}%
22536
+ \BlindDefineSymbol{T_a, T_u, T_r}%
22535
22537
Let $T_a$ be a type
22536
22538
(\commentary{where `a' stands for `argument'}).
22537
22539
Let $T_u$ be the transitive alias expansion of $T_a$
@@ -22666,7 +22668,7 @@ \subsection{Least and Greatest Closure of Types}
22666
22668
}
22667
22669
22668
22670
\LMHash{}%
22669
- \BlindDefineSymbol{S,L, X_j,n}%
22671
+ \BlindDefineSymbol{S, L, X_j, n}%
22670
22672
Let $S$ be a type and $L$ a set of type variables of the form
22671
22673
$\{\List{X}{1}{n}\}$.
22672
22674
@@ -24285,26 +24287,11 @@ \subsubsection{Const type variable elimination}
24285
24287
\}
24286
24288
\end{dartCode}
24287
24289
24288
- \subsubsection{Implicit conversions}
24289
-
24290
- !!!TODO!!!
24291
-
24292
- Implicit tear-off conversion is not performed on objects of nullable type,
24293
- regardless of the context type. For example:
24294
-
24295
- \begin{dartCode}
24296
- \CLASS\ C \{
24297
- int call() \{\}
24298
- \}
24299
- \VOID\ main() \{
24300
- int \FUNCTION()? c0 = \NEW\ C(); // Ok
24301
- int \FUNCTION()? c0 = (null \AS\ C?); // static error
24302
- int \FUNCTION() c1 = (null \AS\ C?); // static error
24303
- \}
24304
- \end{dartCode}
24305
24290
24306
24291
\subsubsection{Constant Objects}
24307
24292
24293
+ !!!TODO!!!
24294
+
24308
24295
The definition of potentially constant expressions is extended to include type
24309
24296
casts and instance checks on potentially constant types, as follows.
24310
24297
0 commit comments