@@ -5364,7 +5364,7 @@ \subsection{Combined Member Signatures}
5364
5364
the combined member signature is $m'$.
5365
5365
5366
5366
\LMHash{}%
5367
- \BlindDefineSymbol{m_j,q}
5367
+ \BlindDefineSymbol{m_j, q}%
5368
5368
Otherwise, $M_0$ contains more than one member signature named $n$.
5369
5369
Let \List{m}{1}{q} be those member signatures.
5370
5370
@@ -7500,7 +7500,7 @@ \subsection{Super-Bounded Types}
7500
7500
}
7501
7501
7502
7502
\LMHash{}%
7503
- \BlindDefineSymbol{T,T_j,s}%
7503
+ \BlindDefineSymbol{T, T_j, s}%
7504
7504
Let $T$ be a parameterized type of the form \code{$G$<\List{T}{1}{s}>}
7505
7505
where $G$ denotes a generic class or a generic type alias.
7506
7506
$T$ is \Index{super-bounded} if{}f the following conditions are both true:
@@ -7909,7 +7909,7 @@ \subsubsection{The Instantiation to Bound Algorithm}
7909
7909
We now specify how the
7910
7910
\Index{instantiation to bound}
7911
7911
algorithm proceeds.
7912
- \BlindDefineSymbol{T,X_j,k, B_j,S_j}%
7912
+ \BlindDefineSymbol{T, X_j, k, B_j, S_j}%
7913
7913
Let $T$ be a raw type.
7914
7914
Let \List{X}{1}{k} be the formal type parameters in the declaration of $G$,
7915
7915
and let \List{B}{1}{k} be their bounds.
@@ -10230,7 +10230,7 @@ \subsubsection{List Literal Inference}
10230
10230
the element type of \metavar{list} as a whole.
10231
10231
10232
10232
\LMHash{}%
10233
- \BlindDefineSymbol{P, P_e}
10233
+ \BlindDefineSymbol{P, P_e}%
10234
10234
The context type $P$
10235
10235
(\ref{setAndMapLiteralDisambiguation})
10236
10236
for each element of \metavar{list} is
@@ -10359,7 +10359,7 @@ \subsubsection{List Literal Inference}
10359
10359
\IndexCustom{type inference on a list literal}{%
10360
10360
type inference!list literal}
10361
10361
as a whole.
10362
- \BlindDefineSymbol{\metavar{list},\ell_j,P}%
10362
+ \BlindDefineSymbol{\metavar{list}, \ell_j, P}%
10363
10363
Assume that \metavar{list} is derived from \synt{listLiteral}
10364
10364
and contains the elements \List{\ell}{1}{n},
10365
10365
and the context type for \metavar{list} is $P$.
@@ -10594,7 +10594,7 @@ \subsubsection{Set and Map Literal Disambiguation}
10594
10594
(\ref{setAndMapLiteralInference}).
10595
10595
10596
10596
\LMHash{}%
10597
- \BlindDefineSymbol{e,{\cal L},C}%
10597
+ \BlindDefineSymbol{e, {\cal L}, C}%
10598
10598
Let $e$ be a \synt{setOrMapLiteral}
10599
10599
with leaf elements $\cal L$ and context type $C$.
10600
10600
If $C$ is \FreeContext{} then let $S$ be undefined.
@@ -10729,7 +10729,7 @@ \subsubsection{Set and Map Literal Inference}
10729
10729
\end{dartCode}
10730
10730
10731
10731
\LMHash{}%
10732
- \BlindDefineSymbol{\metavar{collection},P}%
10732
+ \BlindDefineSymbol{\metavar{collection}, P}%
10733
10733
Let \metavar{collection} be a collection literal
10734
10734
derived from \synt{setOrMapLiteral}.
10735
10735
The inferred type of an \synt{element} is an element type $T$,
@@ -10770,7 +10770,7 @@ \subsubsection{Set and Map Literal Inference}
10770
10770
provides a partial constraint on the inferred type.%
10771
10771
}
10772
10772
\item
10773
- \BlindDefineSymbol{P_k,P_v}%
10773
+ \BlindDefineSymbol{P_k, P_v}%
10774
10774
If \metavar{collection} is unambiguously a map
10775
10775
then $P$ is \code{Map<$P_k$,\,\,$P_v$>}
10776
10776
where $P_k$ and $P_v$ are determined by downwards inference,
@@ -10961,7 +10961,7 @@ \subsubsection{Set and Map Literal Inference}
10961
10961
10962
10962
\LMHash{}%
10963
10963
\Case{If element}
10964
- \BlindDefineSymbol{b,\ell_1,\ell_2}%
10964
+ \BlindDefineSymbol{b, \ell_1, \ell_2}%
10965
10965
In this case $\ell$ is of the form
10966
10966
\code{\IF\,\,($b$)\,\,$\ell_1$} or
10967
10967
\code{\IF\,\,($b$)\,\,$\ell_1$\,\,\ELSE\,\,$\ell_2$}.
@@ -11013,7 +11013,7 @@ \subsubsection{Set and Map Literal Inference}
11013
11013
11014
11014
\LMHash{}%
11015
11015
\Case{For element}
11016
- \BlindDefineSymbol{p,\ell_1}%
11016
+ \BlindDefineSymbol{p, \ell_1}%
11017
11017
In this case $\ell$ is of the form
11018
11018
\code{\AWAIT?\,\,\FOR\,\,($p$)\,\,$\ell_1$}
11019
11019
where $p$ is derived from \synt{forLoopParts} and
@@ -11062,7 +11062,7 @@ \subsubsection{Set and Map Literal Inference}
11062
11062
\IndexCustom{type inference on a set or map literal}{%
11063
11063
type inference!set or map literal}
11064
11064
as a whole.
11065
- \BlindDefineSymbol{\metavar{collection},P}%
11065
+ \BlindDefineSymbol{\metavar{collection}, P}%
11066
11066
Assume that \metavar{collection} is derived from \synt{setOrMapLiteral},
11067
11067
and the context type for \metavar{collection} is $P$.
11068
11068
@@ -13452,9 +13452,9 @@ \subsection{Generic Function Instantiation}
13452
13452
}
13453
13453
13454
13454
\LMHash{}%
13455
- \BlindDefineSymbol{f,G}
13455
+ \BlindDefineSymbol{f, G}
13456
13456
Let $f$ be an expression whose static type $G$ is
13457
- \BlindDefineSymbol{T_0,X_j,B_j,s, p}%
13457
+ \BlindDefineSymbol{T_0, X_j, B_j, s, p}%
13458
13458
a generic function type of the form
13459
13459
\RawFunctionType{T_0}{X}{B}{s}{\metavar{p}}
13460
13460
where \code{($p$)} is derived from \synt{formalParameterList}.
@@ -14002,7 +14002,7 @@ \subsubsection{Ordinary Invocation}
14002
14002
Consider a
14003
14003
\IndexCustom{conditional ordinary method invocation}{%
14004
14004
method invocation!conditional ordinary}
14005
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14005
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14006
14006
$i$ of the form
14007
14007
14008
14008
\noindent
@@ -14053,7 +14053,7 @@ \subsubsection{Ordinary Invocation}
14053
14053
\Case{\code{$C$.$m$<$\cdots$>($\cdots$)}}
14054
14054
A \IndexCustom{static member invocation}{member invocation!static}
14055
14055
$i$ is an invocation of the form
14056
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14056
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14057
14057
\code{%
14058
14058
$C$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
14059
14059
where $C$ is a term derived from \synt{typeName}
@@ -14090,7 +14090,7 @@ \subsubsection{Ordinary Invocation}
14090
14090
The static type of $i$ is as specified there.
14091
14091
14092
14092
\LMHash{}%
14093
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14093
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14094
14094
Evaluation of a static method invocation $i$ of the form
14095
14095
14096
14096
\noindent
@@ -14122,7 +14122,7 @@ \subsubsection{Ordinary Invocation}
14122
14122
\Case{\code{$e$.$m$<$\cdots$>($\cdots$)}}
14123
14123
An \IndexCustom{unconditional ordinary method invocation}{%
14124
14124
method invocation!unconditional ordinary}
14125
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14125
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14126
14126
$i$ is of the form
14127
14127
\code{%
14128
14128
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
@@ -14182,7 +14182,7 @@ \subsubsection{Ordinary Invocation}
14182
14182
}).
14183
14183
14184
14184
\LMHash{}%
14185
- \BlindDefineSymbol{L,d, F}%
14185
+ \BlindDefineSymbol{L, d, F}%
14186
14186
Otherwise \code{$T$.$m$} denotes an instance member.
14187
14187
Let $L$ be the library that contains $i$.
14188
14188
Let $d$ be the result of method lookup for $m$ in $T$ with respect to $L$,
@@ -14252,13 +14252,13 @@ \subsubsection{Ordinary Invocation}
14252
14252
14253
14253
\LMHash{}%
14254
14254
Evaluation of an unconditional ordinary method invocation $i$ of the form
14255
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14255
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14256
14256
\code{%
14257
14257
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)}
14258
14258
proceeds as follows:
14259
14259
14260
14260
\LMHash{}%
14261
- \BlindDefineSymbol{o,f}%
14261
+ \BlindDefineSymbol{o, f}%
14262
14262
First, the expression $e$ is evaluated to an object $o$.
14263
14263
Let $f$ be the result of looking up
14264
14264
(\ref{lookup})
@@ -14615,7 +14615,7 @@ \subsection{Property Extraction}
14615
14615
\Case{Conditional}
14616
14616
Consider a \IndexCustom{conditional property extraction expression}{%
14617
14617
property extraction!conditional}
14618
- \BlindDefineSymbol{i,e, \id}%
14618
+ \BlindDefineSymbol{i, e, \id}%
14619
14619
$i$ of the form \code{$e$?.\id}.
14620
14620
14621
14621
%% TODO(eernst): We are likely to decide that this is an error.
@@ -14642,7 +14642,7 @@ \subsection{Property Extraction}
14642
14642
14643
14643
\LMHash{}%
14644
14644
\Case{Static}
14645
- \BlindDefineSymbol{i,C, \id}%
14645
+ \BlindDefineSymbol{i, C, \id}%
14646
14646
Let \id{} be an identifier;
14647
14647
a \IndexCustom{static property extraction}{%
14648
14648
property extraction!static}
@@ -14707,7 +14707,9 @@ \subsection{Property Extraction}
14707
14707
(\ref{functionClosurization})
14708
14708
by desugaring it to a method closurization on \CALL.
14709
14709
This only occurs when it is statically known that it is a callable object,
14710
- and when the context type requires a function.%
14710
+ and when the context type requires a function.
14711
+ Note that the static type of $e$ can not be potentially nullable,
14712
+ because no such types have a method named \CALL.%
14711
14713
}
14712
14714
\EndCase
14713
14715
@@ -17043,7 +17045,7 @@ \subsection{Lexical Lookup}
17043
17045
}
17044
17046
17045
17047
\LMHash{}%
17046
- \BlindDefineSymbol{n, id}%
17048
+ \BlindDefineSymbol{n, \ id}%
17047
17049
Consider the situation where a name $n$
17048
17050
has basename \id{}
17049
17051
(\ref{classMemberConflicts})
@@ -19012,7 +19014,7 @@ \subsection{Return}
19012
19014
to be \FutureValueTypeOf{$T$}.
19013
19015
19014
19016
\LMHash{}%
19015
- \BlindDefineSymbol{s,e,S,f, T}%
19017
+ \BlindDefineSymbol{s, e, S, f, T}%
19016
19018
Consider a return statement $s$ of the form \code{\RETURN\,\,$e$?;}.
19017
19019
Let $S$ be the static type of $e$, if $e$ is present,
19018
19020
let $f$ be the immediately enclosing function,
@@ -19148,7 +19150,7 @@ \subsection{Return}
19148
19150
\LMHash{}%
19149
19151
\Case{Synchronous non-generator functions and factory constructors}
19150
19152
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19151
- \BlindDefineSymbol{s,e, f}%
19153
+ \BlindDefineSymbol{s, e, f}%
19152
19154
Let $f$ be the immediately enclosing function,
19153
19155
and consider the case where $f$ is a synchronous non-generator
19154
19156
or a factory constructor.
@@ -19170,7 +19172,7 @@ \subsection{Return}
19170
19172
\LMHash{}%
19171
19173
\Case{Asynchronous non-generator functions}
19172
19174
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19173
- \BlindDefineSymbol{s,e,f, T_v}%
19175
+ \BlindDefineSymbol{s, e, f, T_v}%
19174
19176
Let $f$ be the immediately enclosing function,
19175
19177
and consider the case where $f$ is an asynchronous non-generator
19176
19178
with future value type $T_v$.
@@ -22394,7 +22396,7 @@ \subsection{Type Normalization}
22394
22396
22395
22397
\LMHash{}%
22396
22398
The function \Index{\NormalizedTypeOfName} is then defined as follows:
22397
- \BlindDefineSymbol{T_a,T_u,T_r}%
22399
+ \BlindDefineSymbol{T_a, T_u, T_r}%
22398
22400
Let $T_a$ be a type
22399
22401
(\commentary{where `a' stands for `argument'}).
22400
22402
Let $T_u$ be the transitive alias expansion of $T_a$
@@ -22529,7 +22531,7 @@ \subsection{Least and Greatest Closure of Types}
22529
22531
}
22530
22532
22531
22533
\LMHash{}%
22532
- \BlindDefineSymbol{S,L, X_j,n}%
22534
+ \BlindDefineSymbol{S, L, X_j, n}%
22533
22535
Let $S$ be a type and $L$ a set of type variables of the form
22534
22536
$\{\List{X}{1}{n}\}$.
22535
22537
@@ -24147,26 +24149,11 @@ \subsubsection{Const type variable elimination}
24147
24149
\}
24148
24150
\end{dartCode}
24149
24151
24150
- \subsubsection{Implicit conversions}
24151
-
24152
- !!!TODO!!!
24153
-
24154
- Implicit tear-off conversion is not performed on objects of nullable type,
24155
- regardless of the context type. For example:
24156
-
24157
- \begin{dartCode}
24158
- \CLASS\ C \{
24159
- int call() \{\}
24160
- \}
24161
- \VOID\ main() \{
24162
- int \FUNCTION()? c0 = \NEW\ C(); // Ok
24163
- int \FUNCTION()? c0 = (null \AS\ C?); // static error
24164
- int \FUNCTION() c1 = (null \AS\ C?); // static error
24165
- \}
24166
- \end{dartCode}
24167
24152
24168
24153
\subsubsection{Constant Objects}
24169
24154
24155
+ !!!TODO!!!
24156
+
24170
24157
The definition of potentially constant expressions is extended to include type
24171
24158
casts and instance checks on potentially constant types, as follows.
24172
24159
0 commit comments