1 /*
   2  * @test /nodynamiccopyright/
   3  * @summary smoke test for sealed classes
   4  * @compile/fail/ref=SealedTest01.out -XDrawDiagnostics SealedTest01.java
   5  */
   6 
   7 class SealedTest01 {
   8     static sealed class SC permits C_SC { }
   9     static sealed abstract class SAC permits C_SAC { }
  10     static sealed interface SI permits C_SI, I_SI { }
  11 
  12     static class C_SC extends SC { }
  13     static class C_SAC extends SAC { }
  14     static class C_SI implements SI { }
  15     static interface I_SI extends SI { }
  16 }
  17 
  18 class SealedTest01_Other {
  19     static class C_SC extends SealedTest01.SC { }
  20     static class C_SAC extends SealedTest01.SAC { }
  21     static class C_SI implements SealedTest01.SI { }
  22     static interface I_SI extends SealedTest01.SI { }
  23 }