From 4f408f96885c606e0d240429cb193bd7ad98fa07 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Thu, 18 Dec 2014 20:11:06 +0100 Subject: Spec update for signature polymorphic methods --- spec/06-expressions.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec') 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 -- cgit v1.2.3