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/Chapter24Test.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/test/java/com/seaofnodes/simple/Chapter24Test.java') diff --git a/src/test/java/com/seaofnodes/simple/Chapter24Test.java b/src/test/java/com/seaofnodes/simple/Chapter24Test.java index 2bc2ce7f..f4c4f12f 100644 --- a/src/test/java/com/seaofnodes/simple/Chapter24Test.java +++ b/src/test/java/com/seaofnodes/simple/Chapter24Test.java @@ -20,9 +20,9 @@ public class Chapter24Test { @Test public void testRecursiveWidening() { String[] srcs = { // Parm(x) must widen even though the recursive result is constant. - "val f = { int x, int limit -> x >= limit ? 0 : f(x+1,limit); }; return f(0,arg);", + "val f = { int x, int limit -> x >= limit ? 0 : f(++x,limit); }; int limit=arg; return f(0,limit);", // The growing result has its own cycle, which never crosses Parm(x). - "val f = { int x -> x <= 0 ? 0 : f(x-1)+1; }; return f(3);" + "val f = { int x -> x <= 0 ? 0 : f(--x)+1; }; return f(3);" }; for( int i=0; i