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

regression: javac fails to detect conflicting interfaces w/ separate compilation

XMLWordPrintable

    • mantis
    • generic
    • solaris_8
    • Verified

      JCK test clss01004 fails when the classes are separated into different
      translation units and compiled separately. This is due to the absence of
      miranda methods in the output of the 1.4 java compiler. An appropriate
      regression test follows:


      toad:~/4279316.ws/test/tools/unfixed/NEW1 $ cat -n T1.java
           1 /*
           2 * @test %W% %E%
           3 * @bug 4711056
           4 * @summary javac fails to detect conflicting interfaces with separate compilation
           5 * @author gafter
           6 *
           7 * @compile T1.java
           8 * @compile T2.java
           9 * @compile T3.java
          10 * @compile/fail T4.java
          11 */
          12
          13 interface iclss01004_1 {
          14 abstract int foo(int par);
          15 }
      toad:~/4279316.ws/test/tools/unfixed/NEW1 $ cat -n T2.java
           1 interface iclss01004_2 {
           2 abstract void foo(int par);
           3 }
      toad:~/4279316.ws/test/tools/unfixed/NEW1 $ cat -n T3.java
           1 abstract class clss01004_b implements iclss01004_1 {
           2 // int foo(int par);
           3 }
      toad:~/4279316.ws/test/tools/unfixed/NEW1 $ cat -n T4.java
           1 abstract class clss01004_a extends clss01004_b implements iclss01004_2 {
           2 // conflict!
           3 }
      toad:~/4279316.ws/test/tools/unfixed/NEW1 $

            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: