No compilation error reported when a sealed class is declared without permits clause

XMLWordPrintable

      The below code declares a sealed class without any permits clause. It should throw a compilation error. However, the compilation goes through successfully.

      final class Child extends Parent {
      }

      sealed class Parent {
          public int check() { return 1; }
      }

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vinod Khatri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: