From 44505aa5b75b1046f13f2bc2a52fe0b16d975838 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 10 Aug 2026 11:11:18 -0700 Subject: Chapter 30: Text Formatting and Diagnostics Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki Co-authored-by: Claude Opus 5 --- src/test/java/com/seaofnodes/simple/FinalConstructionTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/java/com/seaofnodes/simple/FinalConstructionTest.java') diff --git a/src/test/java/com/seaofnodes/simple/FinalConstructionTest.java b/src/test/java/com/seaofnodes/simple/FinalConstructionTest.java index 66fdacc3..bdb71fc6 100644 --- a/src/test/java/com/seaofnodes/simple/FinalConstructionTest.java +++ b/src/test/java/com/seaofnodes/simple/FinalConstructionTest.java @@ -7,7 +7,7 @@ import static org.junit.Assert.*; public class FinalConstructionTest { private static final String LOOP = """ - val step={int x -> x*2+1;}; + val step={i64 x -> x*2+1;}; struct C { val x=1; new C={int n -> @@ -16,7 +16,7 @@ public class FinalConstructionTest { }; val get={->x;}; }; - return new C(arg).get(); + return new C(((arg<<32)>>32)).get(); """; @Test public void testFinalConstructorFields() throws java.io.IOException { @@ -27,10 +27,10 @@ public class FinalConstructionTest { // Writes are ordinary Stores and may remain inside the loop. String[] sources={ "struct C { val x=1; new C={->x=1; x=2;}; }; return new C().x;", - "struct C { int ~x; new C={int n -> self.x=1; for(int i=0;i for(int i=0;i self.x=1; for(int i=0;i>32)).x;", + "struct C { val x=1; new C={int n -> for(int i=0;i>32)).x;", "struct C { val x=1.5; new C={->x=2.5;}; }; return new C().x;", - "struct C { val x=\"a\"; new C={int n -> for(int i=0;i for(int i=0;i>32)).x[0];", "struct C { val x=new int[1]; new C={->x=new int[2]; x=new int[3];}; }; return new C().x#;" }; String[] results={"2","8","4","2.5","98","3"}; -- cgit v1.2.3