From 81569b60d87cb25637951220b79a859d97ea24b2 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 09:54:35 +0700 Subject: [PATCH] A compound constant is to fold before a bounded variable checks it --- TODO.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.org b/TODO.org index 6cc47b28..f021078d 100644 --- a/TODO.org +++ b/TODO.org @@ -659,7 +659,8 @@ because the walk goes over a struct's fields rather than a union's members. Both are named in the decision as the arms to relax first if it is reopened, and a poisoned pointer is arguably the useful case. -** TODO A compound constant expression at a bounded type variable +** NEXT A compound constant expression at a bounded type variable +Decided 2026-09-25: fold constant integer arithmetic before the bounded-variable literal check, so =(+ x (+ 1 2))= is accepted where =(+ x 3)= is. =(+ x (+ 1 2))= at a bounded variable is refused where =(+ x 3)= works — the literal arm admits a bare constant and nothing folds the compound first. Walk-backable, so it waits until a body actually wants it.