1 /*
   2  * @test /nodynamiccopyright/
   3  * @summary smoke test for sealed classes
   4  * @compile/fail/ref=PermitsInNoSealedClass.out -XDrawDiagnostics PermitsInNoSealedClass.java
   5  */
   6 
   7 import java.lang.annotation.*;
   8 
   9 class PermitsInNoSealedClass {
  10     class NotSealed permits Sub3 {}
  11 
  12     class Sub3 extends NotSealed {}
  13 }