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

javac improperly complains of conflict with non-inherited method

XMLWordPrintable

    • mantis
    • generic
    • solaris_8

      The folowing is an original test case to catch the problem
      detected by jacks 8.1.1.1-default-abstract-12

      ==================== A.java ====================
      /*
       * @test %W% %E%
       * @bug 4738690
       * @summary javac improperly complains of conflict with non-inherited method
       * @author gafter
       *
       * @compile A.java B.java
       */

      package a;
      public abstract class A {
          abstract void f();
      }
      ==================== B.java ====================
      interface B {
          int f();
      }

      /** C is legal because no two *inherited* methods conflict. a.A.f() is
       * not inherited because it is package private in another package. */
      abstract class C extends a.A implements B {
      }

            gafter Neal Gafter (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: