OLD | NEW |
1 \documentclass{article} | 1 \documentclass{article} |
2 \usepackage{epsfig} | 2 \usepackage{epsfig} |
3 \usepackage{dart} | 3 \usepackage{dart} |
4 \usepackage{bnf} | 4 \usepackage{bnf} |
5 \usepackage{hyperref} | 5 \usepackage{hyperref} |
6 \newcommand{\code}[1]{{\sf #1}} | 6 \newcommand{\code}[1]{{\sf #1}} |
7 \title{Dart Programming Language Specification \\ | 7 \title{Dart Programming Language Specification \\ |
8 {\large Version 1.6}} | 8 {\large Version 1.6}} |
9 %\author{The Dart Team} | 9 %\author{The Dart Team} |
10 \begin{document} | 10 \begin{document} |
(...skipping 3252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3263 the static method \code{Function.apply()} with arguments $v.g, [o_1, \ldots , o_
n], \{x_{n+1}: o_{n+1}, \ldots , x_{n+k}: o_{n+k}\}$. | 3263 the static method \code{Function.apply()} with arguments $v.g, [o_1, \ldots , o_
n], \{x_{n+1}: o_{n+1}, \ldots , x_{n+k}: o_{n+k}\}$. |
3264 | 3264 |
3265 If getter lookup has also failed, then a new instance $im$ of the predefined c
lass \code{Invocation} is created, such that : | 3265 If getter lookup has also failed, then a new instance $im$ of the predefined c
lass \code{Invocation} is created, such that : |
3266 \begin{itemize} | 3266 \begin{itemize} |
3267 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. | 3267 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
3268 \item \code{im.memberName} evaluates to \code{'m'}. | 3268 \item \code{im.memberName} evaluates to \code{'m'}. |
3269 \item \code{im.positionalArguments} evaluates to an immutable list with the same
values as \code{[$o_1, \ldots, o_n$]}. | 3269 \item \code{im.positionalArguments} evaluates to an immutable list with the same
values as \code{[$o_1, \ldots, o_n$]}. |
3270 \item \code{im.namedArguments} evaluates to an immutable map with the same keys
and values as \code{\{$x_{n+1}: o_{n+1}, \ldots, x_{n+k} : o_{n+k}$\}}. | 3270 \item \code{im.namedArguments} evaluates to an immutable map with the same keys
and values as \code{\{$x_{n+1}: o_{n+1}, \ldots, x_{n+k} : o_{n+k}$\}}. |
3271 \end{itemize} | 3271 \end{itemize} |
3272 | 3272 |
3273 Then the method \code{noSuchMethod()} is looked up in $o$ and invoked with argum
ent $im$, and the result of this invocation is the result of evaluating $i$. | 3273 Then the method \code{noSuchMethod()} is looked up in $o$ and invoked with argum
ent $im$, and the result of this invocation is the result of evaluating $i$. How
ever, if the implementation found cannot be invoked with a single positional arg
ument, the implementation of \code{noSuchMethod()} in class \code{Object} is in
voked on $o$ with argument $im'$, where $im'$ is an instance of \code{Invocation
} such that : |
| 3274 \begin{itemize} |
| 3275 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
| 3276 \item \code{im.memberName} evaluates to \code{noSuchMethod'}. |
| 3277 \item \code{im.positionalArguments} evaluates to an immutable list whose sole el
ement is $im$. |
| 3278 \item \code{im.namedArguments} evaluates to an empty immutable map. |
| 3279 \end{itemize} |
| 3280 |
| 3281 and the result of the latter invocation is the result of evaluating $i$. |
| 3282 |
| 3283 \rationale { |
| 3284 It is possible to bring about such a situation by overriding \code{noSuchMethod(
)} with the wrong number of arguments:} |
| 3285 |
| 3286 \begin{code} |
| 3287 \CLASS{} Perverse \{ |
| 3288 noSuchMethod(x,y) =$>$ x + y; |
| 3289 \} |
| 3290 |
| 3291 \NEW{} Perverse.unknownMethod(); |
| 3292 \end{code} |
3274 | 3293 |
3275 \commentary{Notice that the wording carefully avoids re-evaluating the receiver
$o$ and the arguments $a_i$. } | 3294 \commentary{Notice that the wording carefully avoids re-evaluating the receiver
$o$ and the arguments $a_i$. } |
3276 | 3295 |
3277 Let $T$ be the static type of $o$. It is a static type warning if $T$ does not
have an accessible (\ref{privacy}) instance member named $m$ unless $T$ or a su
perinterface of $T$ is annotated with an annotation denoting a constant identica
l to the constant \code{@proxy} defined in \code{dart:core}. If $T.m$ exists,
it is a static type warning if the type $F$ of $T.m$ may not be assigned to a f
unction type. If $T.m$ does not exist, or if $F$ is not a function type, the sta
tic type of $i$ is \DYNAMIC{}; otherwise the static type of $i$ is the declared
return type of $F$. | 3296 Let $T$ be the static type of $o$. It is a static type warning if $T$ does not
have an accessible (\ref{privacy}) instance member named $m$ unless $T$ or a su
perinterface of $T$ is annotated with an annotation denoting a constant identica
l to the constant \code{@proxy} defined in \code{dart:core}. If $T.m$ exists,
it is a static type warning if the type $F$ of $T.m$ may not be assigned to a f
unction type. If $T.m$ does not exist, or if $F$ is not a function type, the sta
tic type of $i$ is \DYNAMIC{}; otherwise the static type of $i$ is the declared
return type of $F$. |
3278 % The following is not needed because it is specified in 'Binding Actuals to For
mals" Let $T_i$ be the static type of $a_i, i \in 1 .. n+k$. It is a static warn
ing if $F$ is not a supertype of $(T_1, \ldots, T_n, \{T_{n+1}$ $x_{n+1}, \ldot
s, T_{n+k}$ $x_{n+k}\}) \to \bot$. | 3297 % The following is not needed because it is specified in 'Binding Actuals to For
mals" Let $T_i$ be the static type of $a_i, i \in 1 .. n+k$. It is a static warn
ing if $F$ is not a supertype of $(T_1, \ldots, T_n, \{T_{n+1}$ $x_{n+1}, \ldot
s, T_{n+k}$ $x_{n+k}\}) \to \bot$. |
3279 | 3298 |
3280 | 3299 |
3281 | 3300 |
3282 %\subsubsection{This Invocation} | 3301 %\subsubsection{This Invocation} |
3283 % Maybe this has no significance the way the language is set up? | 3302 % Maybe this has no significance the way the language is set up? |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 If the method lookup has failed, then let $g$ be the result of looking up getter
(\ref{getterAndSetterLookup}) $m$ in $S$ with respect to $L$. If the getter loo
kup succeeded, let $v_g$ be the value of the getter invocation $\SUPER{}.m$. The
n the value of $i$ is the result of invoking | 3379 If the method lookup has failed, then let $g$ be the result of looking up getter
(\ref{getterAndSetterLookup}) $m$ in $S$ with respect to $L$. If the getter loo
kup succeeded, let $v_g$ be the value of the getter invocation $\SUPER{}.m$. The
n the value of $i$ is the result of invoking |
3361 the static method \code{Function.apply()} with arguments $v.g, [o_1, \ldots , o_
n], \{x_{n+1}: o_{n+1}, \ldots , x_{n+k}: o_{n+k}\}$. | 3380 the static method \code{Function.apply()} with arguments $v.g, [o_1, \ldots , o_
n], \{x_{n+1}: o_{n+1}, \ldots , x_{n+k}: o_{n+k}\}$. |
3362 | 3381 |
3363 If getter lookup has also failed, then a new instance $im$ of the predefined c
lass \code{Invocation} is created, such that : | 3382 If getter lookup has also failed, then a new instance $im$ of the predefined c
lass \code{Invocation} is created, such that : |
3364 \begin{itemize} | 3383 \begin{itemize} |
3365 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. | 3384 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
3366 \item \code{im.memberName} evaluates to \code{'m'}. | 3385 \item \code{im.memberName} evaluates to \code{'m'}. |
3367 \item \code{im.positionalArguments} evaluates to an immutable list with the same
values as \code{[$o_1, \ldots, o_n$]}. | 3386 \item \code{im.positionalArguments} evaluates to an immutable list with the same
values as \code{[$o_1, \ldots, o_n$]}. |
3368 \item \code{im.namedArguments} evaluates to an immutable map with the same keys
and values as \code{\{$x_{n+1}: o_{n+1}, \ldots, x_{n+k} : o_{n+k}$\}}. | 3387 \item \code{im.namedArguments} evaluates to an immutable map with the same keys
and values as \code{\{$x_{n+1}: o_{n+1}, \ldots, x_{n+k} : o_{n+k}$\}}. |
3369 \end{itemize} | 3388 \end{itemize} |
3370 Then the method \code{noSuchMethod()} is looked up in $S$ and invoked on \THIS{}
with argument $im$, and the result of this invocation is the result of evaluati
ng $i$. | 3389 Then the method \code{noSuchMethod()} is looked up in $S$ and invoked on \THIS{}
with argument $im$, and the result of this invocation is the result of evaluati
ng $i$. However, if the implementation found cannot be invoked with a single pos
itional argument, the implementation of \code{noSuchMethod()} in class \code{Ob
ject} is invoked on \THIS{} with argument $im'$, where $im'$ is an instance of \
code{Invocation} such that : |
| 3390 \begin{itemize} |
| 3391 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
| 3392 \item \code{im.memberName} evaluates to \code{noSuchMethod}. |
| 3393 \item \code{im.positionalArguments} evaluates to an immutable list whose sole el
ement is $im$. |
| 3394 \item \code{im.namedArguments} evaluates to an empty immutable map. |
| 3395 \end{itemize} |
| 3396 |
| 3397 and the result of this latter invocation is the result of evaluating $i$. |
| 3398 |
3371 | 3399 |
3372 It is a compile-time error if a super method invocation occurs in a top-level fu
nction or variable initializer, in an instance variable initializer or initializ
er list, in class \code{Object}, in a factory constructor or in a static method
or variable initializer. | 3400 It is a compile-time error if a super method invocation occurs in a top-level fu
nction or variable initializer, in an instance variable initializer or initializ
er list, in class \code{Object}, in a factory constructor or in a static method
or variable initializer. |
3373 | 3401 |
3374 It is a static type warning if $S$ does not have an accessible (\ref{privacy}) i
nstance member named $m$ unless $S$ or a superinterface of $S$ is annotated with
an annotation denoting a constant identical to the constant \code{@proxy} defin
ed in \code{dart:core}. If $S.m$ exists, it is a static type warning if the typ
e $F$ of $S.m$ may not be assigned to a function type. If $S.m$ does not exist,
or if $F$ is not a function type, the static type of $i$ is \DYNAMIC{}; otherwis
e the static type of $i$ is the declared return type of $F$. | 3402 It is a static type warning if $S$ does not have an accessible (\ref{privacy}) i
nstance member named $m$ unless $S$ or a superinterface of $S$ is annotated with
an annotation denoting a constant identical to the constant \code{@proxy} defin
ed in \code{dart:core}. If $S.m$ exists, it is a static type warning if the typ
e $F$ of $S.m$ may not be assigned to a function type. If $S.m$ does not exist,
or if $F$ is not a function type, the static type of $i$ is \DYNAMIC{}; otherwis
e the static type of $i$ is the declared return type of $F$. |
3375 % The following is not needed because it is specified in 'Binding Actuals to For
mals" | 3403 % The following is not needed because it is specified in 'Binding Actuals to For
mals" |
3376 %Let $T_i$ be the static type of $a_i, i \in 1 .. n+k$. It is a static warning i
f $F$ is not a supertype of $(T_1, \ldots, t_n, \{T_{n+1}$ $x_{n+1}, \ldots, T_
{n+k}$ $x_{n+k}\}) \to \bot$. | 3404 %Let $T_i$ be the static type of $a_i, i \in 1 .. n+k$. It is a static warning i
f $F$ is not a supertype of $(T_1, \ldots, t_n, \{T_{n+1}$ $x_{n+1}, \ldots, T_
{n+k}$ $x_{n+k}\}) \to \bot$. |
3377 | 3405 |
3378 | 3406 |
3379 | 3407 |
3380 | 3408 |
(...skipping 29 matching lines...) Expand all Loading... |
3410 First, the expression $e$ is evaluated to an object $o$. Then, the getter functi
on (\ref{getters}) $m$ is looked up (\ref{getterAndSetterLookup}) in $o$ with r
espect to the current library, and its body is executed with \THIS{} bound to $
o$. The value of the getter invocation expression is the result returned by the
call to the getter function. | 3438 First, the expression $e$ is evaluated to an object $o$. Then, the getter functi
on (\ref{getters}) $m$ is looked up (\ref{getterAndSetterLookup}) in $o$ with r
espect to the current library, and its body is executed with \THIS{} bound to $
o$. The value of the getter invocation expression is the result returned by the
call to the getter function. |
3411 | 3439 |
3412 | 3440 |
3413 If the getter lookup has failed, then a new instance $im$ of the predefined cla
ss \code{Invocation} is created, such that : | 3441 If the getter lookup has failed, then a new instance $im$ of the predefined cla
ss \code{Invocation} is created, such that : |
3414 \begin{itemize} | 3442 \begin{itemize} |
3415 \item \code{im.isGetter} evaluates to \code{\TRUE{}}. | 3443 \item \code{im.isGetter} evaluates to \code{\TRUE{}}. |
3416 \item \code{im.memberName} evaluates to \code{'m'}. | 3444 \item \code{im.memberName} evaluates to \code{'m'}. |
3417 \item \code{im.positionalArguments} evaluates to the value of \code{\CONST{} []}
. | 3445 \item \code{im.positionalArguments} evaluates to the value of \code{\CONST{} []}
. |
3418 \item \code{im.namedArguments} evaluates to the value of \code{\CONST{} \{\}}. | 3446 \item \code{im.namedArguments} evaluates to the value of \code{\CONST{} \{\}}. |
3419 \end{itemize} | 3447 \end{itemize} |
3420 Then the method \code{noSuchMethod()} is looked up in $o$ and invoked with argu
ment $im$, and the result of this invocation is the result of evaluating $i$. | 3448 Then the method \code{noSuchMethod()} is looked up in $o$ and invoked with argu
ment $im$, and the result of this invocation is the result of evaluating $i$. Ho
wever, if the implementation found cannot be invoked with a single positional ar
gument, the implementation of \code{noSuchMethod()} in class \code{Object} is i
nvoked on $o$ with argument $im'$, where $im'$ is an instance of \code{Invocatio
n} such that : |
| 3449 \begin{itemize} |
| 3450 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
| 3451 \item \code{im.memberName} evaluates to \code{noSuchMethod}. |
| 3452 \item \code{im.positionalArguments} evaluates to an immutable list whose sole el
ement is $im$. |
| 3453 \item \code{im.namedArguments} evaluates to an empty immutable map. |
| 3454 \end{itemize} |
| 3455 |
| 3456 and the result of this latter invocation is the result of evaluating $i$. |
3421 | 3457 |
3422 Let $T$ be the static type of $e$. It is a static type warning if $T$ does not
have a getter named $m$ unless $T$ or a superinterface of $T$ is annotated with
an annotation denoting a constant identical to the constant \code{@proxy} define
d in \code{dart:core}. The static type of $i$ is the declared return type of $T.
m$, if $T.m$ exists; otherwise the static type of $i$ is \DYNAMIC{}. | 3458 Let $T$ be the static type of $e$. It is a static type warning if $T$ does not
have a getter named $m$ unless $T$ or a superinterface of $T$ is annotated with
an annotation denoting a constant identical to the constant \code{@proxy} define
d in \code{dart:core}. The static type of $i$ is the declared return type of $T.
m$, if $T.m$ exists; otherwise the static type of $i$ is \DYNAMIC{}. |
3423 | 3459 |
3424 Evaluation of a getter invocation $i$ of the form $C.m$ proceeds as follows: | 3460 Evaluation of a getter invocation $i$ of the form $C.m$ proceeds as follows: |
3425 | 3461 |
3426 If there is no class $C$ in the enclosing lexical scope of $i$, or if $C$ does
not declare, implicitly or explicitly, a getter named $m$, then a \code{NoSuchM
ethodError} is thrown. | 3462 If there is no class $C$ in the enclosing lexical scope of $i$, or if $C$ does
not declare, implicitly or explicitly, a getter named $m$, then a \code{NoSuchM
ethodError} is thrown. |
3427 Otherwise, the getter function $C.m$ is invoked. The value of $i$ is the result
returned by the call to the getter function. | 3463 Otherwise, the getter function $C.m$ is invoked. The value of $i$ is the result
returned by the call to the getter function. |
3428 | 3464 |
3429 It is a static warning if there is no class $C$ in the enclosing lexical scope
of $i$, or if $C$ does not declare, implicitly or explicitly, a getter named $m
$. The static type of $i$ is the declared return type of $C.m$ if it exists or \
DYNAMIC{} otherwise. | 3465 It is a static warning if there is no class $C$ in the enclosing lexical scope
of $i$, or if $C$ does not declare, implicitly or explicitly, a getter named $m
$. The static type of $i$ is the declared return type of $C.m$ if it exists or \
DYNAMIC{} otherwise. |
3430 | 3466 |
(...skipping 10 matching lines...) Expand all Loading... |
3441 | 3477 |
3442 Let $S$ be the superclass of the immediately enclosing class. The getter functio
n (\ref{getters}) $m$ is looked up (\ref{getterAndSetterLookup}) in $S$ with re
spect to the current library, and its body is executed with \THIS{} bound to th
e current value of \THIS{}. The value of the getter invocation expression is t
he result returned by the call to the getter function. | 3478 Let $S$ be the superclass of the immediately enclosing class. The getter functio
n (\ref{getters}) $m$ is looked up (\ref{getterAndSetterLookup}) in $S$ with re
spect to the current library, and its body is executed with \THIS{} bound to th
e current value of \THIS{}. The value of the getter invocation expression is t
he result returned by the call to the getter function. |
3443 | 3479 |
3444 If the getter lookup has failed, then a new instance $im$ of the predefined cla
ss \code{Invocation} is created, such that : | 3480 If the getter lookup has failed, then a new instance $im$ of the predefined cla
ss \code{Invocation} is created, such that : |
3445 \begin{itemize} | 3481 \begin{itemize} |
3446 \item \code{im.isGetter} evaluates to \code{\TRUE{}}. | 3482 \item \code{im.isGetter} evaluates to \code{\TRUE{}}. |
3447 \item \code{im.memberName} evaluates to \code{'m'}. | 3483 \item \code{im.memberName} evaluates to \code{'m'}. |
3448 \item \code{im.positionalArguments} evaluates to the value of \code{\CONST{} []}
. | 3484 \item \code{im.positionalArguments} evaluates to the value of \code{\CONST{} []}
. |
3449 \item \code{im.namedArguments} evaluates to the value of \code{\CONST{} \{\}}. | 3485 \item \code{im.namedArguments} evaluates to the value of \code{\CONST{} \{\}}. |
3450 \end{itemize} | 3486 \end{itemize} |
3451 Then the method \code{noSuchMethod()} is looked up in $S$ and invoked with argu
ment $im$, and the result of this invocation is the result of evaluating $i$. | 3487 Then the method \code{noSuchMethod()} is looked up in $S$ and invoked with argu
ment $im$, and the result of this invocation is the result of evaluating $i$. Ho
wever, if the implementation found cannot be invoked with a single positional ar
gument, the implementation of \code{noSuchMethod()} in class \code{Object} is i
nvoked on \THIS{} with argument $im'$, where $im'$ is an instance of \code{Invoc
ation} such that : |
| 3488 \begin{itemize} |
| 3489 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
| 3490 \item \code{im.memberName} evaluates to \code{noSuchMethod}. |
| 3491 \item \code{im.positionalArguments} evaluates to an immutable list whose sole el
ement is $im$. |
| 3492 \item \code{im.namedArguments} evaluates to an empty immutable map. |
| 3493 \end{itemize} |
3452 | 3494 |
3453 | 3495 and the result of this latter invocation is the result of evaluating $i$. |
3454 | 3496 |
3455 It is a static type warning if $S$ does not have a getter named $m$. The static
type of $i$ is the declared return type of $S.m$, if $S.m$ exists; otherwise th
e static type of $i$ is \DYNAMIC{}. | 3497 It is a static type warning if $S$ does not have a getter named $m$. The static
type of $i$ is the declared return type of $S.m$, if $S.m$ exists; otherwise th
e static type of $i$ is \DYNAMIC{}. |
3456 | 3498 |
3457 Evaluation of a getter invocation of the form $p.C.v$, where $p$ is a deferred p
refix, proceeds as follows: | 3499 Evaluation of a getter invocation of the form $p.C.v$, where $p$ is a deferred p
refix, proceeds as follows: |
3458 | 3500 |
3459 If $p$ has been successfully loaded, the assignment is evaluated exactly like th
e invocation $K.v$, where $K$ denotes the top level member $C$ of the library re
presented by $p$. Otherwise a \code{NoSuchMethodError} is thrown. | 3501 If $p$ has been successfully loaded, the assignment is evaluated exactly like th
e invocation $K.v$, where $K$ denotes the top level member $C$ of the library re
presented by $p$. Otherwise a \code{NoSuchMethodError} is thrown. |
3460 | 3502 |
3461 | 3503 |
3462 Evaluation of a top-level getter invocation $i$ of the form $p.m$, where $p$ is
a deferred prefix and $m$ is an identifier, proceeds as follows: | 3504 Evaluation of a top-level getter invocation $i$ of the form $p.m$, where $p$ is
a deferred prefix and $m$ is an identifier, proceeds as follows: |
3463 | 3505 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3527 The expression $e_1$ is evaluated to an object $o_1$. Then, the expression $e_2$
is evaluated to an object $o_2$. Then, the setter $v=$ is looked up (\ref{gett
erAndSetterLookup}) in $o_1$ with respect to the current library, and its body i
s executed with its formal parameter bound to $o_2$ and \THIS{} bound to $o_1$. | 3569 The expression $e_1$ is evaluated to an object $o_1$. Then, the expression $e_2$
is evaluated to an object $o_2$. Then, the setter $v=$ is looked up (\ref{gett
erAndSetterLookup}) in $o_1$ with respect to the current library, and its body i
s executed with its formal parameter bound to $o_2$ and \THIS{} bound to $o_1$. |
3528 | 3570 |
3529 If the setter lookup has failed, then a new instance $im$ of the predefined cla
ss \code{Invocation} is created, such that : | 3571 If the setter lookup has failed, then a new instance $im$ of the predefined cla
ss \code{Invocation} is created, such that : |
3530 \begin{itemize} | 3572 \begin{itemize} |
3531 \item \code{im.isSetter} evaluates to \code{\TRUE{}}. | 3573 \item \code{im.isSetter} evaluates to \code{\TRUE{}}. |
3532 \item \code{im.memberName} evaluates to \code{'v='}. | 3574 \item \code{im.memberName} evaluates to \code{'v='}. |
3533 \item \code{im.positionalArguments} evaluates to an immutable list with the same
values as \code{[$o_2$]}. | 3575 \item \code{im.positionalArguments} evaluates to an immutable list with the same
values as \code{[$o_2$]}. |
3534 \item \code{im.namedArguments} evaluates to the value of \code{\CONST{} \{\}}. | 3576 \item \code{im.namedArguments} evaluates to the value of \code{\CONST{} \{\}}. |
3535 \end{itemize} | 3577 \end{itemize} |
3536 | 3578 |
3537 Then the method \code{noSuchMethod()} is looked up in $o_1$ and invoked with ar
gument $im$. The value of the assignment expression is $o_2$ irrespective of whe
ther setter lookup has failed or succeeded. | 3579 Then the method \code{noSuchMethod()} is looked up in $o_1$ and invoked with ar
gument $im$. |
| 3580 However, if the implementation found cannot be invoked with a single positional
argument, the implementation of \code{noSuchMethod()} in class \code{Object} is
invoked on $o_1$ with argument $im'$, where $im'$ is an instance of \code{Invoc
ation} such that : |
| 3581 \begin{itemize} |
| 3582 \item \code{im.isMethod} evaluates to \code{\TRUE{}}. |
| 3583 \item \code{im.memberName} evaluates to \code{noSuchMethod}. |
| 3584 \item \code{im.positionalArguments} evaluates to an immutable list whose sole el
ement is $im$. |
| 3585 \item \code{im.namedArguments} evaluates to an empty immutable map. |
| 3586 \end{itemize} |
| 3587 |
| 3588 The value of the assignment expression is $o_2$ irrespective of whether setter l
ookup has failed or succeeded. |
3538 | 3589 |
3539 Evaluation of an assignment of the form $p.v \code{=} e$, where $p$ is a deferre
d prefix, proceeds as follows: | 3590 Evaluation of an assignment of the form $p.v \code{=} e$, where $p$ is a deferre
d prefix, proceeds as follows: |
3540 | 3591 |
3541 If $p$ has been successfully loaded, the assignment is evaluated exactly like th
e assignment $w \code{=} e$, where $w$ denotes the top level member named $v$ of
the library represented by $p$. Otherwise, $e$ is evaluated and then a \code{No
SuchMethodError} is thrown. | 3592 If $p$ has been successfully loaded, the assignment is evaluated exactly like th
e assignment $w \code{=} e$, where $w$ denotes the top level member named $v$ of
the library represented by $p$. Otherwise, $e$ is evaluated and then a \code{No
SuchMethodError} is thrown. |
3542 | 3593 |
3543 Evaluation of an assignment of the form $p.C.v \code{=} e$, where $p$ is a defer
red prefix, proceeds as follows: | 3594 Evaluation of an assignment of the form $p.C.v \code{=} e$, where $p$ is a defer
red prefix, proceeds as follows: |
3544 | 3595 |
3545 If $p$ has been successfully loaded, the assignment is evaluated exactly like th
e assignment $K.v = e$, where $K$ denotes the top level member $C$ of the librar
y represented by $p$. Otherwise $e$ is evaluated and then a \code{NoSuchMethodEr
ror} is thrown. | 3596 If $p$ has been successfully loaded, the assignment is evaluated exactly like th
e assignment $K.v = e$, where $K$ denotes the top level member $C$ of the librar
y represented by $p$. Otherwise $e$ is evaluated and then a \code{NoSuchMethodEr
ror} is thrown. |
3546 | 3597 |
3547 In checked mode, it is a dynamic type error if $o_2$ is not \NULL{} and the inte
rface of the class of $o_2$ is not a subtype of the actual type of $e_1.v$. | 3598 In checked mode, it is a dynamic type error if $o_2$ is not \NULL{} and the inte
rface of the class of $o_2$ is not a subtype of the actual type of $e_1.v$. |
(...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6033 \item The names of compile time constant variables never use lower case letters.
If they consist of multiple words, those words are separated by underscores. Ex
amples: PI, I\_AM\_A\_CONSTANT. | 6084 \item The names of compile time constant variables never use lower case letters.
If they consist of multiple words, those words are separated by underscores. Ex
amples: PI, I\_AM\_A\_CONSTANT. |
6034 \item The names of functions (including getters, setters, methods and local or l
ibrary functions) and non-constant variables begin with a lowercase letter. If t
he name consists of multiple words, each word (except the first) begins with an
uppercase letter. No other uppercase letters are used. Examples: camlCase, dar
t4TheWorld | 6085 \item The names of functions (including getters, setters, methods and local or l
ibrary functions) and non-constant variables begin with a lowercase letter. If t
he name consists of multiple words, each word (except the first) begins with an
uppercase letter. No other uppercase letters are used. Examples: camlCase, dar
t4TheWorld |
6035 \item The names of types (including classes and type aliases) begin with an uppe
r case letter. If the name consists of multiple words, each word begins with
an uppercase letter. No other uppercase letters are used. Examples: CamlCase, D
art4TheWorld. | 6086 \item The names of types (including classes and type aliases) begin with an uppe
r case letter. If the name consists of multiple words, each word begins with
an uppercase letter. No other uppercase letters are used. Examples: CamlCase, D
art4TheWorld. |
6036 \item The names of type variables are short (preferably single letter). Examples
: T, S, K, V , E. | 6087 \item The names of type variables are short (preferably single letter). Examples
: T, S, K, V , E. |
6037 \item The names of libraries or library prefixes never use upper case letters. I
f they consist of multiple words, those words are separated by underscores. Exam
ple: my\_favorite\_library. | 6088 \item The names of libraries or library prefixes never use upper case letters. I
f they consist of multiple words, those words are separated by underscores. Exam
ple: my\_favorite\_library. |
6038 \end{itemize} | 6089 \end{itemize} |
6039 } | 6090 } |
6040 | 6091 |
6041 | 6092 |
6042 \end{document} | 6093 \end{document} |
OLD | NEW |