@@ -5550,7 +5550,7 @@ \subsection{Combined Member Signatures}
5550
5550
the combined member signature is $m'$.
5551
5551
5552
5552
\LMHash{}%
5553
- \BlindDefineSymbol{m_j,q}
5553
+ \BlindDefineSymbol{m_j, q}%
5554
5554
Otherwise, $M_0$ contains more than one member signature named $n$.
5555
5555
Let \List{m}{1}{q} be those member signatures.
5556
5556
@@ -7686,7 +7686,7 @@ \subsection{Super-Bounded Types}
7686
7686
}
7687
7687
7688
7688
\LMHash{}%
7689
- \BlindDefineSymbol{T,T_j,s}%
7689
+ \BlindDefineSymbol{T, T_j, s}%
7690
7690
Let $T$ be a parameterized type of the form \code{$G$<\List{T}{1}{s}>}
7691
7691
where $G$ denotes a generic class or a generic type alias.
7692
7692
$T$ is \Index{super-bounded} if{}f the following conditions are both true:
@@ -8095,7 +8095,7 @@ \subsubsection{The Instantiation to Bound Algorithm}
8095
8095
We now specify how the
8096
8096
\Index{instantiation to bound}
8097
8097
algorithm proceeds.
8098
- \BlindDefineSymbol{T,X_j,k, B_j,S_j}%
8098
+ \BlindDefineSymbol{T, X_j, k, B_j, S_j}%
8099
8099
Let $T$ be a raw type.
8100
8100
Let \List{X}{1}{k} be the formal type parameters in the declaration of $G$,
8101
8101
and let \List{B}{1}{k} be their bounds.
@@ -10421,7 +10421,7 @@ \subsubsection{List Literal Inference}
10421
10421
the element type of \metavar{list} as a whole.
10422
10422
10423
10423
\LMHash{}%
10424
- \BlindDefineSymbol{P, P_e}
10424
+ \BlindDefineSymbol{P, P_e}%
10425
10425
The context type $P$
10426
10426
(\ref{setAndMapLiteralDisambiguation})
10427
10427
for each element of \metavar{list} is
@@ -10550,7 +10550,7 @@ \subsubsection{List Literal Inference}
10550
10550
\IndexCustom{type inference on a list literal}{%
10551
10551
type inference!list literal}
10552
10552
as a whole.
10553
- \BlindDefineSymbol{\metavar{list},\ell_j,P}%
10553
+ \BlindDefineSymbol{\metavar{list}, \ell_j, P}%
10554
10554
Assume that \metavar{list} is derived from \synt{listLiteral}
10555
10555
and contains the elements \List{\ell}{1}{n},
10556
10556
and the context type for \metavar{list} is $P$.
@@ -10785,7 +10785,7 @@ \subsubsection{Set and Map Literal Disambiguation}
10785
10785
(\ref{setAndMapLiteralInference}).
10786
10786
10787
10787
\LMHash{}%
10788
- \BlindDefineSymbol{e,{\cal L},C}%
10788
+ \BlindDefineSymbol{e, {\cal L}, C}%
10789
10789
Let $e$ be a \synt{setOrMapLiteral}
10790
10790
with leaf elements $\cal L$ and context type $C$.
10791
10791
If $C$ is \FreeContext{} then let $S$ be undefined.
@@ -10920,7 +10920,7 @@ \subsubsection{Set and Map Literal Inference}
10920
10920
\end{dartCode}
10921
10921
10922
10922
\LMHash{}%
10923
- \BlindDefineSymbol{\metavar{collection},P}%
10923
+ \BlindDefineSymbol{\metavar{collection}, P}%
10924
10924
Let \metavar{collection} be a collection literal
10925
10925
derived from \synt{setOrMapLiteral}.
10926
10926
The inferred type of an \synt{element} is an element type $T$,
@@ -10961,7 +10961,7 @@ \subsubsection{Set and Map Literal Inference}
10961
10961
provides a partial constraint on the inferred type.%
10962
10962
}
10963
10963
\item
10964
- \BlindDefineSymbol{P_k,P_v}%
10964
+ \BlindDefineSymbol{P_k, P_v}%
10965
10965
If \metavar{collection} is unambiguously a map
10966
10966
then $P$ is \code{Map<$P_k$,\,\,$P_v$>}
10967
10967
where $P_k$ and $P_v$ are determined by downwards inference,
@@ -11152,7 +11152,7 @@ \subsubsection{Set and Map Literal Inference}
11152
11152
11153
11153
\LMHash{}%
11154
11154
\Case{If element}
11155
- \BlindDefineSymbol{b,\ell_1,\ell_2}%
11155
+ \BlindDefineSymbol{b, \ell_1, \ell_2}%
11156
11156
In this case $\ell$ is of the form
11157
11157
\code{\IF\,\,($b$)\,\,$\ell_1$} or
11158
11158
\code{\IF\,\,($b$)\,\,$\ell_1$\,\,\ELSE\,\,$\ell_2$}.
@@ -11204,7 +11204,7 @@ \subsubsection{Set and Map Literal Inference}
11204
11204
11205
11205
\LMHash{}%
11206
11206
\Case{For element}
11207
- \BlindDefineSymbol{p,\ell_1}%
11207
+ \BlindDefineSymbol{p, \ell_1}%
11208
11208
In this case $\ell$ is of the form
11209
11209
\code{\AWAIT?\,\,\FOR\,\,($p$)\,\,$\ell_1$}
11210
11210
where $p$ is derived from \synt{forLoopParts} and
@@ -11253,7 +11253,7 @@ \subsubsection{Set and Map Literal Inference}
11253
11253
\IndexCustom{type inference on a set or map literal}{%
11254
11254
type inference!set or map literal}
11255
11255
as a whole.
11256
- \BlindDefineSymbol{\metavar{collection},P}%
11256
+ \BlindDefineSymbol{\metavar{collection}, P}%
11257
11257
Assume that \metavar{collection} is derived from \synt{setOrMapLiteral},
11258
11258
and the context type for \metavar{collection} is $P$.
11259
11259
@@ -13649,9 +13649,9 @@ \subsection{Generic Function Instantiation}
13649
13649
}
13650
13650
13651
13651
\LMHash{}%
13652
- \BlindDefineSymbol{f,G}
13652
+ \BlindDefineSymbol{f, G}
13653
13653
Let $f$ be an expression whose static type $G$ is
13654
- \BlindDefineSymbol{T_0,X_j,B_j,s, p}%
13654
+ \BlindDefineSymbol{T_0, X_j, B_j, s, p}%
13655
13655
a generic function type of the form
13656
13656
\RawFunctionType{T_0}{X}{B}{s}{\metavar{p}}
13657
13657
where \code{($p$)} is derived from \synt{formalParameterList}.
@@ -14199,7 +14199,7 @@ \subsubsection{Ordinary Invocation}
14199
14199
Consider a
14200
14200
\IndexCustom{conditional ordinary method invocation}{%
14201
14201
method invocation!conditional ordinary}
14202
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14202
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14203
14203
$i$ of the form
14204
14204
14205
14205
\noindent
@@ -14250,7 +14250,7 @@ \subsubsection{Ordinary Invocation}
14250
14250
\Case{\code{$C$.$m$<$\cdots$>($\cdots$)}}
14251
14251
A \IndexCustom{static member invocation}{member invocation!static}
14252
14252
$i$ is an invocation of the form
14253
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14253
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14254
14254
\code{%
14255
14255
$C$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
14256
14256
where $C$ is a term derived from \synt{typeName}
@@ -14287,7 +14287,7 @@ \subsubsection{Ordinary Invocation}
14287
14287
The static type of $i$ is as specified there.
14288
14288
14289
14289
\LMHash{}%
14290
- \BlindDefineSymbol{i,C,m, A_j,r, a_j,n, x_j,k}%
14290
+ \BlindDefineSymbol{i, C, m, A_j, r, a_j, n, x_j, k}%
14291
14291
Evaluation of a static method invocation $i$ of the form
14292
14292
14293
14293
\noindent
@@ -14319,7 +14319,7 @@ \subsubsection{Ordinary Invocation}
14319
14319
\Case{\code{$e$.$m$<$\cdots$>($\cdots$)}}
14320
14320
An \IndexCustom{unconditional ordinary method invocation}{%
14321
14321
method invocation!unconditional ordinary}
14322
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14322
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14323
14323
$i$ is of the form
14324
14324
\code{%
14325
14325
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)},
@@ -14379,7 +14379,7 @@ \subsubsection{Ordinary Invocation}
14379
14379
}).
14380
14380
14381
14381
\LMHash{}%
14382
- \BlindDefineSymbol{L,d, F}%
14382
+ \BlindDefineSymbol{L, d, F}%
14383
14383
Otherwise \code{$T$.$m$} denotes an instance member.
14384
14384
Let $L$ be the library that contains $i$.
14385
14385
Let $d$ be the result of method lookup for $m$ in $T$ with respect to $L$,
@@ -14507,13 +14507,13 @@ \subsubsection{Ordinary Invocation}
14507
14507
14508
14508
\LMHash{}%
14509
14509
Evaluation of an unconditional ordinary method invocation $i$ of the form
14510
- \BlindDefineSymbol{i,e,m, A_j,r, a_j,n, x_j,k}%
14510
+ \BlindDefineSymbol{i, e, m, A_j, r, a_j, n, x_j, k}%
14511
14511
\code{%
14512
14512
$e$.$m$<\TypeArgumentListStd>(\ArgumentListStd)}
14513
14513
proceeds as follows:
14514
14514
14515
14515
\LMHash{}%
14516
- \BlindDefineSymbol{o,f}%
14516
+ \BlindDefineSymbol{o, f}%
14517
14517
First, the expression $e$ is evaluated to an object $o$.
14518
14518
Let $f$ be the result of looking up
14519
14519
(\ref{lookup})
@@ -14870,7 +14870,7 @@ \subsection{Property Extraction}
14870
14870
\Case{Conditional}
14871
14871
Consider a \IndexCustom{conditional property extraction expression}{%
14872
14872
property extraction!conditional}
14873
- \BlindDefineSymbol{i,e, \id}%
14873
+ \BlindDefineSymbol{i, e, \id}%
14874
14874
$i$ of the form \code{$e$?.\id}.
14875
14875
14876
14876
%% TODO(eernst): We are likely to decide that this is an error.
@@ -14897,7 +14897,7 @@ \subsection{Property Extraction}
14897
14897
14898
14898
\LMHash{}%
14899
14899
\Case{Static}
14900
- \BlindDefineSymbol{i,C, \id}%
14900
+ \BlindDefineSymbol{i, C, \id}%
14901
14901
Let \id{} be an identifier;
14902
14902
a \IndexCustom{static property extraction}{%
14903
14903
property extraction!static}
@@ -14962,7 +14962,9 @@ \subsection{Property Extraction}
14962
14962
(\ref{functionClosurization})
14963
14963
by desugaring it to a method closurization on \CALL.
14964
14964
This only occurs when it is statically known that it is a callable object,
14965
- and when the context type requires a function.%
14965
+ and when the context type requires a function.
14966
+ Note that the static type of $e$ can not be potentially nullable,
14967
+ because no such types have a method named \CALL.%
14966
14968
}
14967
14969
\EndCase
14968
14970
@@ -17348,7 +17350,7 @@ \subsection{Lexical Lookup}
17348
17350
}
17349
17351
17350
17352
\LMHash{}%
17351
- \BlindDefineSymbol{n, id}%
17353
+ \BlindDefineSymbol{n, \ id}%
17352
17354
Consider the situation where a name $n$
17353
17355
has basename \id{}
17354
17356
(\ref{classMemberConflicts})
@@ -19369,7 +19371,7 @@ \subsection{Return}
19369
19371
to be \FutureValueTypeOf{$T$}.
19370
19372
19371
19373
\LMHash{}%
19372
- \BlindDefineSymbol{s,e,S,f, T}%
19374
+ \BlindDefineSymbol{s, e, S, f, T}%
19373
19375
Consider a return statement $s$ of the form \code{\RETURN\,\,$e$?;}.
19374
19376
Let $S$ be the static type of $e$, if $e$ is present,
19375
19377
let $f$ be the immediately enclosing function,
@@ -19505,7 +19507,7 @@ \subsection{Return}
19505
19507
\LMHash{}%
19506
19508
\Case{Synchronous non-generator functions and factory constructors}
19507
19509
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19508
- \BlindDefineSymbol{s,e, f}%
19510
+ \BlindDefineSymbol{s, e, f}%
19509
19511
Let $f$ be the immediately enclosing function,
19510
19512
and consider the case where $f$ is a synchronous non-generator
19511
19513
or a factory constructor.
@@ -19527,7 +19529,7 @@ \subsection{Return}
19527
19529
\LMHash{}%
19528
19530
\Case{Asynchronous non-generator functions}
19529
19531
Let $s$ be a statement of the form \code{\RETURN\,\,$e$;}.
19530
- \BlindDefineSymbol{s,e,f, T_v}%
19532
+ \BlindDefineSymbol{s, e, f, T_v}%
19531
19533
Let $f$ be the immediately enclosing function,
19532
19534
and consider the case where $f$ is an asynchronous non-generator
19533
19535
with future value type $T_v$.
@@ -22769,7 +22771,7 @@ \subsection{Type Normalization}
22769
22771
22770
22772
\LMHash{}%
22771
22773
The function \Index{\NormalizedTypeOfName} is then defined as follows:
22772
- \BlindDefineSymbol{T_a,T_u,T_r}%
22774
+ \BlindDefineSymbol{T_a, T_u, T_r}%
22773
22775
Let $T_a$ be a type
22774
22776
(\commentary{where `a' stands for `argument'}).
22775
22777
Let $T_u$ be the transitive alias expansion of $T_a$
@@ -22904,7 +22906,7 @@ \subsection{Least and Greatest Closure of Types}
22904
22906
}
22905
22907
22906
22908
\LMHash{}%
22907
- \BlindDefineSymbol{S,L, X_j,n}%
22909
+ \BlindDefineSymbol{S, L, X_j, n}%
22908
22910
Let $S$ be a type and $L$ a set of type variables of the form
22909
22911
$\{\List{X}{1}{n}\}$.
22910
22912
@@ -24523,26 +24525,11 @@ \subsubsection{Const type variable elimination}
24523
24525
\}
24524
24526
\end{dartCode}
24525
24527
24526
- \subsubsection{Implicit conversions}
24527
-
24528
- !!!TODO!!!
24529
-
24530
- Implicit tear-off conversion is not performed on objects of nullable type,
24531
- regardless of the context type. For example:
24532
-
24533
- \begin{dartCode}
24534
- \CLASS\ C \{
24535
- int call() \{\}
24536
- \}
24537
- \VOID\ main() \{
24538
- int \FUNCTION()? c0 = \NEW\ C(); // Ok
24539
- int \FUNCTION()? c0 = (null \AS\ C?); // static error
24540
- int \FUNCTION() c1 = (null \AS\ C?); // static error
24541
- \}
24542
- \end{dartCode}
24543
24528
24544
24529
\subsubsection{Constant Objects}
24545
24530
24531
+ !!!TODO!!!
24532
+
24546
24533
The definition of potentially constant expressions is extended to include type
24547
24534
casts and instance checks on potentially constant types, as follows.
24548
24535
0 commit comments