Correct type rules following changes to getter behavior.

R=lrn@google.com

Review URL: https://codereview.chromium.org//186883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33466 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
gbracha@google.com
2014-03-07 23:39:03 +00:00
parent b5a93986a5
commit 708f25bdef
+4 -4
View File
@@ -3951,7 +3951,7 @@ Let $d$ be the innermost declaration in the enclosing lexical scope whose name i
\item If $d$ is a static method, top-level function or local function then $e$ evaluates to the function defined by $d$.
\item If $d$ is the declaration of a static variable, static getter or static setter declared in class $C$, then $e$ is equivalent to the getter invocation (\ref{getterInvocation}) $C.id$.
\item If $d$ is the declaration of a library variable, top-level getter or top-level setter, then $e$ is equivalent to the getter invocation $id$.
\item Otherwise, if $e$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $e$ causes a\code{NoSuchMethod} to be thrown.
\item Otherwise, if $e$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $e$ causes a \code{NoSuchMethod} to be thrown.
\item Otherwise, $e$ is equivalent to the property extraction (\ref{propertyExtraction}) \THIS{}.$id$.
% This implies that referring to an undefined static getter by simple name is an error, whereas doing so by qualified name is only a warning. Same with assignments. Revise?
\end{itemize}
@@ -3961,9 +3961,9 @@ The static type of $e$ is determined as follows:
\begin{itemize}
\item If $d$ is a class, type alias or type parameter the static type of $e$ is \code{Type}.
\item If $d$ is a local variable or formal parameter the static type of $e$ is the type of the variable $id$, unless $id$ is known to have some type $T$, in which case the static type of $e$ is $T$, provided that $T$ is more specific than any other type $S$ such that $v$ is known to have type $S$.
\item If $d$ is a static method, top-level function or local function the static type of $e$ the function type defined by $d$.
\item If $d$ is the declaration of a static variable or static getter declared in class $C$, the static type of $e$ the static type of the getter invocation (\ref{getterInvocation}) $C.id$.
\item If $d$ is the declaration of a library variable or top-level getter, the static type of $e$ is the static type of the getter invocation $id$.
\item If $d$ is a static method, top-level function or local function the static type of $e$ is the function type defined by $d$.
\item If $d$ is the declaration of a static variable, static getter or static setter declared in class $C$, the static type of $e$ is the static type of the getter invocation (\ref{getterInvocation}) $C.id$.
\item If $d$ is the declaration of a library variable, top-level getter or top-level setter, the static type of $e$ is the static type of the getter invocation $id$.
\item Otherwise, if $e$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, the static type of $e$ is \DYNAMIC{}.
\item Otherwise, the static type of $e$ is the type of the property extraction (\ref{propertyExtraction}) \THIS{}.$id$.
\end{itemize}