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

Javac allows interfaces to inherit methods with inconsistent signatures.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5.1
    • Verification:
      Not verified

      Description


      allan.jacobs@Eng 1997-03-28

      algol% cat n0941501.java
      interface I1{
        int f();
      }
      interface I2 {
        void f() ;
      }
      interface I3 extends I1,I2 { } // error: Return types conflict.
      //class X implements I3 {
      //
      //}
      algol% javac n0941501.java
      algol% ls
      I1.class I2.class I3.class n0941501.java


      Removing the comments from the declaration of class X forces javac
      to check properly. But, users might declare their interfaces in
      separate files and compile their files separately. So, this is a
      compiler bug.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tturnidgsunw Todd Turnidge (Inactive)
              Reporter:
              ajacobssunw Allan Jacobs (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: