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

IncompatibleClassChangeError expected for 2 or more maximally-specific matching methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs25
    • None
    • hotspot
    • b59

        Given the following (indirectly compiled in such a way to avoid errors):

        interface K { int m() default { return 99; } }
        interface L { int m() default { return 101; } }
        interface J extends K, L {}
        interface I extends J, K { int m() default { J.super.m(); } }
        class C implements I {}

        C c = new C(); c.m(); // expected: ICCE; actual no error

        An IncompatibleClassChangeError is expected but none is thrown. c.m() links to K.m().

              acorn Karen Kinnear (Inactive)
              psandoz Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: