Integrated: 8253944: Certain method references to VarHandle methods should fail
psandoz at openjdk.java.net
Mon Oct 5 17:18:45 UTC 2020
On Fri, 2 Oct 2020 17:38:19 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> A regression was introduced in javac when processing method references to signature polymorphic methods whose return
> type is not polymorphic.
> It is possible to successfully target type a method reference for a VarHandle sig-poly method to a functional interface
> whose methods return type is incompatible with the VarHandle method. This results in a runtime linkage error rather
> than a source compile time error. See the following email thread for more details:
> The fix is to "patch-back" the method's return type if it is not polymorphic. As a result it was possible to simplify
> the inference logic and keep it focused more on inference.
This pull request has now been integrated.
Author: Paul Sandoz <psandoz at openjdk.org>
Stats: 158 lines in 5 files changed: 125 ins; 13 del; 20 mod
8253944: Certain method references to VarHandle methods should fail
More information about the compiler-dev