1 /*
   2  * @test /nodynamiccopyright/
   3  * @summary records cannot explicitly declare hashCode or equals
   4  * @compile RecordsCanReDeclareMembersTest.java
   5  */
   6 
   7 public record RecordsCanReDeclareMembersTest(int i) {
   8     @Override
   9     public int hashCode() { return 0; }
  10     @Override
  11     public boolean equals(Object o) { return true; }
  12     @Override
  13     public String toString() { return ""; } // toString() is OK
  14 
  15     public int i() { return i; }
  16 }