diff options
Diffstat (limited to 'javatests/com/google/turbine/lower/testdata/record_tostring.test')
-rw-r--r-- | javatests/com/google/turbine/lower/testdata/record_tostring.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/javatests/com/google/turbine/lower/testdata/record_tostring.test b/javatests/com/google/turbine/lower/testdata/record_tostring.test new file mode 100644 index 0000000..f93187a --- /dev/null +++ b/javatests/com/google/turbine/lower/testdata/record_tostring.test @@ -0,0 +1,35 @@ +=== Records.java === + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; +import java.util.Objects; + +class Records { + public record A() { + @Override + public String toString() { + return "A"; + } + } + + public record B() { + @Override + public final String toString() { + return "B"; + } + } + + public record C() { + @Override + public final boolean equals(Object o) { + return false; + } + } + + public record D() { + @Override + public final int hashCode() { + return -1; + } + } +}
\ No newline at end of file |