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

the implementation of the isDisjoint relation is not in sync with its last definition in the sealed classes spec

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 17, 18
    • Fix Version/s: tbd
    • Component/s: tools
    • Labels:

      Description

      There is a mismatch between last version of the isDisjoint relation as specified in the sealed classes spec and its implementation in javac, this should be corrected as otherwise acceptable code could be rejected when class hierarchies are sealed. In particular The main discrepancy I think is caused by the fact that the isDisjoint relation is mostly skipped when at least one of the types being considered is an intersection type.

      last spec: http://cr.openjdk.java.net/~gbierman/jep409/jep409-20210507/specs/sealed-classes-jls.html

        Attachments

          Activity

            People

            Assignee:
            vromero Vicente Arturo Romero Zaldivar
            Reporter:
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: