mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:27:39 +00:00
Make use of call on Function exempt from warnings,
BUG= R=lrn@google.com Review URL: https://codereview.chromium.org//1176853003.
This commit is contained in:
parent
7c1bccb263
commit
2b95ed1ae1
|
@ -3870,6 +3870,8 @@ Let $T$ be the static type of $o$. It is a static type warning if $T$ does not
|
|||
\item
|
||||
$T$ or a superinterface of $T$ is annotated with an annotation denoting a constant identical to the constant \code{@proxy} defined in \code{dart:core}. Or
|
||||
\item $T$ is \code{Type}, $e$ is a constant type literal and the class corresponding to $e$ has a static getter named $m$.
|
||||
\item $T$ is \code{Function} and $m$ is \CALL. \rationale {The type \code{Function} is treated as if it has a \code{call} method for any possible signature of \CALL. The expectation is that any concrete subclass of \code{Function} will implement \CALL. Note that a warning will be issue if this is not the case. Furthermore, any use of \CALL on a subclass of \code{Function} that fails to implement \CALL{} will also provoke a a warning, as this exemption is limited to type \code{Function}, and does not apply to its subtypes.
|
||||
}
|
||||
\end{itemize}
|
||||
|
||||
\LMHash{}
|
||||
|
@ -4158,12 +4160,14 @@ Let $T$ be the static type of $e$. It is a static type warning if $T$ does not h
|
|||
\begin{itemize}
|
||||
\item $T$ or a superinterface of $T$ is annotated with an annotation denoting a constant identical to the constant \code{@proxy} defined in \cd{dart:core}. Or
|
||||
\item $T$ is \cd{Type}, $e$ is a constant type literal and the class corresponding to $e$ declares an accessible static method or getter named $m$.
|
||||
\item $T$ is \code{Function} and $m$ is \CALL.
|
||||
\end{itemize}
|
||||
|
||||
The static type of $i$ is:
|
||||
\begin{itemize}
|
||||
\item The static type of function $T.m$, if $T$ has an accessible instance member named $m$.
|
||||
\item The static type of function $T.m$, if $T$ is \cd{Type}, $e$ is a constant type literal and the class corresponding to $e$ declares an accessible static member or constructor named $m$.
|
||||
\item \code{Function} if $T$ is \code{Function} and $m$ is \CALL.
|
||||
\item The type \DYNAMIC{} otherwise.
|
||||
\end{itemize}
|
||||
|
||||
|
|
Loading…
Reference in a new issue