Skip to content

Commit 4678729

Browse files
committed
Merge pull request #8 from lrytz/7965-spec
Spec update for signature polymorphic methods
2 parents c1d092a + 4f408f9 commit 4678729

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/06-expressions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,19 @@ The final result of the transformation is a block of the form
410410
}
411411
```
412412

413+
### Signature Polymorphic Methods
414+
415+
For invocations of signature polymorphic methods of the target platform `$f$($e_1 , \ldots , e_m$)`,
416+
the invoked function has a different method type `($p_1$:$T_1 , \ldots , p_n$:$T_n$)$U$` at each call
417+
site. The parameter types `$T_ , \ldots , T_n$` are the types of the argument expressions
418+
`$e_1 , \ldots , e_m$` and `$U$` is the expected type at the call site. If the expected type is
419+
undefined then `$U$` is `scala.AnyRef`. The parameter names `$p_1 , \ldots , p_n$` are fresh.
420+
421+
###### Note
422+
423+
On the Java platform version 7 and later, the methods `invoke` and `invokeExact` in class
424+
`java.lang.invoke.MethodHandle` are signature polymorphic.
425+
413426
## Method Values
414427

415428
```ebnf

0 commit comments

Comments
 (0)