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

[lw4] Javac tolerates mutually incompatible super types.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • tools
    • generic
    • generic

      http://cr.openjdk.java.net/~dlsmith/jep8277163/jep8277163-20220519/specs/value-objects-jls.html

      8.1.5 Superinterfaces

      ...

      It is a compile-time error if an identity class (8.1.1.5) has a superinterface that is a value interface, or if a value class has a superinterface that is an identity interface, or if any class has both an identity superclass or superinterface and a value superclass or superinterface.

      But javac tolerates this code:

      identity interface II {}
      value interface VI {}

      abstract class X implements II, VI {}

            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: