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

Invalid class name in with block with JavaImporter causes MH type mismatch

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3
    • Resolution: Fixed
    • None
    • 8
    • core-libs
    • None
    • b86
    • Verified

    Description

      with(new JavaImporter()) {
         new X();
      }

      causes:


      java.lang.IllegalArgumentException: target and combiner types must match: (Object,Object)Object != (Object)ScriptFunction
      at java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:109)
      at java.lang.invoke.MethodHandles.misMatchedTypes(MethodHandles.java:2129)
      at java.lang.invoke.MethodHandles.foldArguments(MethodHandles.java:2068)
      at jdk.nashorn.internal.lookup.MethodHandleFactory$StandardMethodHandleFunctionality.foldArguments(MethodHandleFactory.java:317)
      at jdk.nashorn.internal.runtime.WithObject.fixExpressionCallSite(WithObject.java:242)
      at jdk.nashorn.internal.runtime.WithObject.lookup(WithObject.java:172)
      ...

      Attachments

        Activity

          People

            attila Attila Szegedi
            attila Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: