1 /*
   2  * @test /nodynamiccopyright/
   3  * @summary smoke test for sealed classes
   4  * @compile/fail/ref=NotSealedTest.out -XDrawDiagnostics NotSealedTest.java
   5  */
   6 
   7 import java.lang.annotation.*;
   8 
   9 class NotSealedTest {
  10     sealed class Super {}
  11     sealed non-sealed class Sub extends Super {}
  12 
  13     final sealed class Super2 {}
  14 
  15     final non-sealed class Super3 {}
  16 
  17     non-sealed class NoSealedSuper {}
  18 
  19     sealed public void m() {}
  20 }