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

Sealed classes: prohibit member classes of local/anonymous classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P4
    • 16
    • 15
    • tools
    • None

    Description

      Per this design discussion:

      https://mail.openjdk.java.net/pipermail/amber-spec-experts/2020-May/002161.html

      The consensus is that, at least until we revisit the topic, member classes of local/anonymous classes should not be allowed to use the 'sealed' modifier or to extend/implement a sealed class or interface.

      javac should be updated accordingly.

      Attachments

        Issue Links

          Activity

            People

              vromero Vicente Arturo Romero Zaldivar
              dlsmith Dan Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: