1 /*
   2  * @test /nodynamiccopyright/
   3  * @summary smoke negative test for datum classes
   4  * @compile/fail/ref=Neg01.out -XDrawDiagnostics Neg01.java
   5  */
   6 
   7 public class Neg01 {
   8     static record Sup1(int x, int y) { }
   9 
  10     record Bad1(int x, int y, int z) extends Sup1(x, y) { } //can't extend
  11 
  12     static class Sup2 { }
  13 
  14     static record Sup3(int x, int y) { }
  15 }