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

invokestatic: ICCE trying to invoke static method when it clashes with an abstract method inherited from an interface

    Details

    • Subcomponent:
    • Resolved In Build:
      b66
    • Verification:
      Verified

      Backports

        Description

        Consider the following case:
           public interface I1 { default public void m() {}}
           public interface I2 extends I1 { public void m(); }
           public class T3 implements I2 { public static void m() {}}

        NB: T3 isn't marked abstract.

        Call site: T3 { invokestatic T3.m()V T3 }

        VM behavior (test case attached): IncompatibleClassChangeError: Expected static method p1.T3.m()I

        JVMS: T3.m should be invoked.

        It's a regression from the fix for JDK-8027804 (verified that the test passes w/o the fix).

        ILW = HLH = P2
        I = H = JVMS violation
        L = L = forbidden by JLS; a case of separate compilation issue
        W = H = none

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hseigel Harold Seigel
                  Reporter:
                  vlivanov Vladimir Ivanov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: