Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253944

Certain method references to VarHandle methods should fail

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 16
    • 16
    • tools
    • None
    • b19

    Description

      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:

      https://mail.openjdk.java.net/pipermail/compiler-dev/2020-October/015088.html

      Attachments

        Issue Links

          Activity

            People

              psandoz Paul Sandoz
              psandoz Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: