JavaCompilerCore/resources/bytecode/javFiles/RecordTest.jav
Daniel Holle 9472b5c86f
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m23s
Types are weird in this one
2024-03-25 13:51:56 +01:00

22 lines
474 B
Java

import java.lang.Integer;
record Rec(Integer a, Integer b) {}
/*public class Rec {
x; y;
Rec(Integer a, Integer b) {
x = a;
y = b;
}
}*/
public class RecordTest {
Rec a = new Rec(10, 20);
Rec b = new Rec(10, 20);
Rec c = new Rec(20, 40);
public doesEqual() { return a.equals(b); }
public doesNotEqual() { return b.equals(c); }
public hashCode() { return a.hashCode(); }
public toString() { return a.toString(); }
}