From c328d1dfd3452b1a059646f274567f4b49ede757 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 20 Nov 2024 16:58:50 -0600 Subject: [PATCH] Add a test that verifies this bug --- .../com/google/gwt/dev/jjs/test/Java17Test.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/user/test-super/com/google/gwt/dev/jjs/super/com/google/gwt/dev/jjs/test/Java17Test.java b/user/test-super/com/google/gwt/dev/jjs/super/com/google/gwt/dev/jjs/test/Java17Test.java index fc238a981b..27310f0c73 100644 --- a/user/test-super/com/google/gwt/dev/jjs/super/com/google/gwt/dev/jjs/test/Java17Test.java +++ b/user/test-super/com/google/gwt/dev/jjs/super/com/google/gwt/dev/jjs/test/Java17Test.java @@ -138,6 +138,14 @@ public int compareTo(InnerRecord other) { */ record RecordWithReferenceType(TopLevelRecord refType){} + record RecordWithCtors(String a, int b) { +// public RecordWithCtors { +// } + public RecordWithCtors(int a, int b) { + this(String.valueOf(a), b); + } + } + public void testRecordClasses() { /** * Sample local record. @@ -188,6 +196,11 @@ public String toString() { assertFalse(sameA.hashCode() == different.hashCode()); assertFalse(sameA.equals(null)); + + RecordWithCtors hasCtors = new RecordWithCtors(1, 2); + assertEquals("1", hasCtors.a()); + assertEquals(2, hasCtors.b()); + assertEquals(new RecordWithCtors("1", 2), hasCtors); } /**