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); } /**