Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
% 'class' scope.
% - Add specification of `>>` in JavaScript compiled code, in appendix.
% - Integrate the specification of extension methods into this document.
% - Specify identifier references denoting extension members.
%
% 2.7
% - Rename non-terminals `<...Definition>` to `<...Declaration>` (e.g., it is
Expand Down Expand Up @@ -16244,10 +16245,19 @@ \subsection{Identifier Reference}
where $T$ is a subtype of any other type $S$
such that $v$ is known to have type $S$,
in which case the static type of $e$ is $T$.
\item
% Extension getter invocation by scope.
If $D$ is a declaration of an instance getter in an extension $E$
then the static type of $e$ is the return type of $D$.
\item
% Extension method tear-off by scope.
If $D$ is a declaration of an instance method
in an extension $E$ then the static type of $e$ is
the function type of $D$.
\item
\commentary{%
A lexical lookup will never yield a declaration $D$
which is an instance member.%
which is an instance member of a class.%
}
\end{itemize}
\vspace{-1ex}
Expand Down Expand Up @@ -16334,6 +16344,17 @@ \subsection{Identifier Reference}
then $e$ evaluates to the function object obtained by closurization
(\ref{functionClosurization})
of $D$.
\item
If $D$ is an instance getter declaration in an extension $E$,
then $e$ evaluates to the result of invoking said getter
with the current binding of \THIS{}, and
the current bindings of the type parameters declared by $D$.
\item
If $D$ is an instance method declaration in an extension $E$
with type parameters \List{X}{1}{s},
then $e$ evaluates to the result of the extension method closurization
\code{$E$<\List{X}{1}{s}>(\THIS).\id}
(\ref{extensionMethodClosurization}).
\item
If $D$ is a local variable $v$
(\commentary{which can be a formal parameter})
Expand Down