OLD | NEW |
1 \documentclass{article} | 1 \documentclass{article} |
2 \usepackage{epsfig} | 2 \usepackage{epsfig} |
3 \usepackage{color} | 3 \usepackage{color} |
4 \usepackage{dart} | 4 \usepackage{dart} |
5 \usepackage{bnf} | 5 \usepackage{bnf} |
6 \usepackage{hyperref} | 6 \usepackage{hyperref} |
7 \usepackage{lmodern} | 7 \usepackage{lmodern} |
8 \newcommand{\code}[1]{{\sf #1}} | 8 \newcommand{\code}[1]{{\sf #1}} |
9 \title{Dart Programming Language Specification \\ | 9 \title{Dart Programming Language Specification \\ |
10 {\large Version 1.10}} | 10 {\large Version 1.10}} |
(...skipping 3652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3663 \LMHash{} | 3663 \LMHash{} |
3664 An unqualified function invocation $i$ has the form | 3664 An unqualified function invocation $i$ has the form |
3665 | 3665 |
3666 $id(a_1, \ldots, a_n, x_{n+1}: a_{n+1}, \ldots, x_{n+k}: a_{n+k})$, | 3666 $id(a_1, \ldots, a_n, x_{n+1}: a_{n+1}, \ldots, x_{n+k}: a_{n+k})$, |
3667 | 3667 |
3668 where $id$ is an identifier. | 3668 where $id$ is an identifier. |
3669 | 3669 |
3670 \LMHash{} | 3670 \LMHash{} |
3671 If there exists a lexically visible declaration named $id$, let $f_{id}$ be the
innermost such declaration. Then: | 3671 If there exists a lexically visible declaration named $id$, let $f_{id}$ be the
innermost such declaration. Then: |
3672 \begin{itemize} | 3672 \begin{itemize} |
| 3673 \item |
| 3674 If $f_{id}$ is a prefix object, a compile-time error occurs. |
3673 \item | 3675 \item |
3674 If $f_{id}$ is a local function, a library function, a library or static getter
or a variable then $i$ is interpreted as a function expression invocation (\ref
{functionExpressionInvocation}). | 3676 If $f_{id}$ is a local function, a library function, a library or static getter
or a variable then $i$ is interpreted as a function expression invocation (\ref
{functionExpressionInvocation}). |
3675 \item | 3677 \item |
3676 Otherwise, if $f_{id}$ is a static method of the enclosing class $C$, $i$ is equ
ivalent to $C.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})
$. | 3678 Otherwise, if $f_{id}$ is a static method of the enclosing class $C$, $i$ is equ
ivalent to $C.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})
$. |
3677 \item Otherwise, $f_{id}$ is considered equivalent to the ordinary method invoca
tion $\THIS{}.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})
$. | 3679 \item Otherwise, $f_{id}$ is considered equivalent to the ordinary method invoca
tion $\THIS{}.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})
$. |
3678 \end{itemize} | 3680 \end{itemize} |
3679 | 3681 |
3680 %Otherwise, if there is an accessible (\ref{privacy}) static method named $id$ d
eclared in a superclass $S$ of the immediately enclosing class $C$ then i is equ
ivalent to the static method invocation $S.id(a_1, \ldots, a_n, x_{n+1}: a_{n+1}
, \ldots, x_{n+k}: a_{n+k})$. | |
3681 | |
3682 %\rationale{ | |
3683 %Unqualified access to static methods of superclasses is inconsistent with the i
dea that static methods are not inherited. It is not particularly necessary and
may be restricted in future versions. | |
3684 %} | |
3685 | |
3686 \LMHash{} | 3682 \LMHash{} |
3687 Otherwise, if $i$ occurs inside a top level or static function (be it function,
method, getter, or setter) or variable initializer, evaluation of $i$ causes a
\cd{NoSuchMethodError} to be thrown. | 3683 Otherwise, if $i$ occurs inside a top level or static function (be it function,
method, getter, or setter) or variable initializer, evaluation of $i$ causes a
\cd{NoSuchMethodError} to be thrown. |
3688 | 3684 |
3689 \LMHash{} | 3685 \LMHash{} |
3690 If $i$ does not occur inside a top level or static function, $i$ is equivalent t
o $\THIS{}.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$. | 3686 If $i$ does not occur inside a top level or static function, $i$ is equivalent t
o $\THIS{}.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$. |
3691 | 3687 |
| 3688 |
3692 % Should also say: | 3689 % Should also say: |
3693 % It is a static warning if $i$ occurs inside a top level or static function (b
e it function, method, getter, or setter) or variable initializer and there is
no lexically visible declaration named $id$ in scope. | 3690 % It is a static warning if $i$ occurs inside a top level or static function (b
e it function, method, getter, or setter) or variable initializer and there is
no lexically visible declaration named $id$ in scope. |
3694 | 3691 |
3695 | 3692 |
3696 | 3693 |
3697 | 3694 |
3698 | 3695 |
3699 \subsubsection{ Function Expression Invocation} | 3696 \subsubsection{ Function Expression Invocation} |
3700 \LMLabel{functionExpressionInvocation} | 3697 \LMLabel{functionExpressionInvocation} |
3701 | 3698 |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4399 %If there is neither a local variable declaration with name $v$ nor a setter dec
laration with name $v=$ in the lexical scope enclosing $a$, then: | 4396 %If there is neither a local variable declaration with name $v$ nor a setter dec
laration with name $v=$ in the lexical scope enclosing $a$, then: |
4400 %\begin{itemize} | 4397 %\begin{itemize} |
4401 % \item If $a$ occurs inside a top level or static function (be it function, me
thod, getter, or setter) or variable initializer, evaluation of $a$ causes $e$
to be evaluated, after which a \code{NoSuchMethodError} is thrown. | 4398 % \item If $a$ occurs inside a top level or static function (be it function, me
thod, getter, or setter) or variable initializer, evaluation of $a$ causes $e$
to be evaluated, after which a \code{NoSuchMethodError} is thrown. |
4402 % \item Otherwise, the assignment is equivalent to the assignment \code{ \THIS{}
.$v$ = $e$}. | 4399 % \item Otherwise, the assignment is equivalent to the assignment \code{ \THIS{}
.$v$ = $e$}. |
4403 % \end{itemize} | 4400 % \end{itemize} |
4404 | 4401 |
4405 %Otherwise | 4402 %Otherwise |
4406 | 4403 |
4407 \LMHash{} | 4404 \LMHash{} |
4408 Let $d$ be the innermost declaration whose name is $v$ or $v=$, if it exists. | 4405 Let $d$ be the innermost declaration whose name is $v$ or $v=$, if it exists. |
| 4406 It is a compile-time error if $d$ denotes a prefix object. |
4409 | 4407 |
4410 \LMHash{} | 4408 \LMHash{} |
4411 If $d$ is the declaration of a local variable, the expression $e$ is evaluated t
o an object $o$. Then, the variable $v$ is bound to $o$ unless $v$ is \FINAL{} o
r \CONST{}, in which case a dynamic error occurs. | 4409 If $d$ is the declaration of a local variable, the expression $e$ is evaluated t
o an object $o$. Then, the variable $v$ is bound to $o$ unless $v$ is \FINAL{} o
r \CONST{}, in which case a dynamic error occurs. |
4412 If no error occurs, the value of the assignment expression is $o$. | 4410 If no error occurs, the value of the assignment expression is $o$. |
4413 | 4411 |
4414 % add local functions per bug 23218 | 4412 % add local functions per bug 23218 |
4415 | 4413 |
4416 \LMHash{} | 4414 \LMHash{} |
4417 If $d$ is the declaration of a library variable, top level getter or top level s
etter, the expression $e$ is evaluated to an object $o$. Then the setter $v=$ is
invoked with its formal parameter bound to $o$. The value of the assignment exp
ression is $o$. | 4415 If $d$ is the declaration of a library variable, top level getter or top level s
etter, the expression $e$ is evaluated to an object $o$. Then the setter $v=$ is
invoked with its formal parameter bound to $o$. The value of the assignment exp
ression is $o$. |
4418 | 4416 |
(...skipping 3387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7806 | 7804 |
7807 The invariant that each normative paragraph is associated with a line | 7805 The invariant that each normative paragraph is associated with a line |
7808 containing the text \LMHash{} should be maintained. Extra occurrences | 7806 containing the text \LMHash{} should be maintained. Extra occurrences |
7809 of \LMHash{} can be added if needed, e.g., in order to make | 7807 of \LMHash{} can be added if needed, e.g., in order to make |
7810 individual \item{}s in itemized lists addressable. Each \LM.. command | 7808 individual \item{}s in itemized lists addressable. Each \LM.. command |
7811 must occur on a separate line. \LMHash{} must occur immediately | 7809 must occur on a separate line. \LMHash{} must occur immediately |
7812 before the associated paragraph, and \LMLabel must occur immediately | 7810 before the associated paragraph, and \LMLabel must occur immediately |
7813 after the associated \section{}, \subsection{} etc. | 7811 after the associated \section{}, \subsection{} etc. |
7814 | 7812 |
7815 ---------------------------------------------------------------------- | 7813 ---------------------------------------------------------------------- |
OLD | NEW |