Skip to content

Commit

Permalink
Make use of call on Function exempt from warnings,
Browse files Browse the repository at this point in the history
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1176853003.
  • Loading branch information
gbracha committed Jun 15, 2015
1 parent 7c1bccb commit 2b95ed1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/language/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3870,6 +3870,8 @@ \subsubsection{Ordinary Invocation}
\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{}
Expand Down Expand Up @@ -4158,12 +4160,14 @@ \subsubsection{General Closurization}
\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}

Expand Down

0 comments on commit 2b95ed1

Please sign in to comment.