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

Method reference in subinterface of type I.super::foo produces exception at runtime

    XMLWordPrintable

Details

    • b92
    • 8
    • b113
    • generic
    • generic
    • Verified

    Description

      Java produces the following Exception at runtime:

      Exception in thread "main" java.lang.ClassFormatError: Method lambda$0$bridge in class x/T has illegal modifiers: 0x1000

      Testcase:

      package x;

      interface SAM {
          int m();
      }

      interface SuperI {
          public default int foo() { return 0; }
      }

      interface I extends SuperI {
      }

      interface T extends I {
          public default void boo() { SAM s = I.super::foo; }
      }

      public class lmbd04804m0 {
          public static void main(String argv[]) {
              new T(){};
          }
      }

      Attachments

        Issue Links

          Activity

            People

              rfield Robert Field (Inactive)
              vrudomet Victor Rudometov
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: