diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-12-18 20:11:06 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-12-18 20:12:40 +0100 |
commit | 4f408f96885c606e0d240429cb193bd7ad98fa07 (patch) | |
tree | 2596f5bb96634cf73f4ae8e58686a4cd0ae01c06 /spec | |
parent | c1d092a2fa2ffe08e7eb895501193aac6c2de5a2 (diff) | |
download | scala-4f408f96885c606e0d240429cb193bd7ad98fa07.tar.gz scala-4f408f96885c606e0d240429cb193bd7ad98fa07.tar.bz2 scala-4f408f96885c606e0d240429cb193bd7ad98fa07.zip |
Spec update for signature polymorphic methods
Diffstat (limited to 'spec')
-rw-r--r-- | spec/06-expressions.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/06-expressions.md b/spec/06-expressions.md index afd1492744..5038ebb34d 100644 --- a/spec/06-expressions.md +++ b/spec/06-expressions.md @@ -410,6 +410,19 @@ The final result of the transformation is a block of the form } ``` +### Signature Polymorphic Methods + +For invocations of signature polymorphic methods of the target platform `$f$($e_1 , \ldots , e_m$)`, +the invoked function has a different method type `($p_1$:$T_1 , \ldots , p_n$:$T_n$)$U$` at each call +site. The parameter types `$T_ , \ldots , T_n$` are the types of the argument expressions +`$e_1 , \ldots , e_m$` and `$U$` is the expected type at the call site. If the expected type is +undefined then `$U$` is `scala.AnyRef`. The parameter names `$p_1 , \ldots , p_n$` are fresh. + +###### Note + +On the Java platform version 7 and later, the methods `invoke` and `invokeExact` in class +`java.lang.invoke.MethodHandle` are signature polymorphic. + ## Method Values ```ebnf |