-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8
-
None
There is an assert in j.l.invoke.MemberName that triggers when running with -esa and invoking a method reference to an interface static. See attached diff for a possible fix and a test.
Stacktrace:
java.lang.AssertionError
at java.lang.invoke.MemberName.referenceKindIsConsistent(MemberName.java:238)
at java.lang.invoke.MemberName.access$100(MemberName.java:72)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:856)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:872)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1037)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1341)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:381)
at MethodReferenceAssertionError.main(MethodReferenceAssertionError.java)
Stacktrace:
java.lang.AssertionError
at java.lang.invoke.MemberName.referenceKindIsConsistent(MemberName.java:238)
at java.lang.invoke.MemberName.access$100(MemberName.java:72)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:856)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:872)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1037)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1341)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:381)
at MethodReferenceAssertionError.main(MethodReferenceAssertionError.java)
- duplicates
-
JDK-8008687 MethodHandle code: allow static and invokespecial calls to interface methods
- Closed