The transfer out of an initialiser is a restart's, not an unhandled signal's

This commit is contained in:
Joseph Ferano 2026-09-20 13:21:11 +07:00
parent b0ee9a3ce0
commit 2127d4d070

View File

@ -3446,7 +3446,9 @@ let startup_sym = fname ".init-globals"
rather than be skipped. [Check.no_transfer_in_init] refuses a [signal] or an
[invoke-restart] written *in* the initialiser, but it is syntactic and over
that expression only: the initialiser is lifted into a function of its own,
and a callee of that function can signal unhandled and transfer. The guarded
and a callee of that function can still transfer out not by signalling
unhandled, which is a no-op, but through a handler invoking a restart or
through the break hook aiming the channel. The guarded
branch then leaves through the call's transfer edge with the store not done
and the flag still false which is the behaviour to want, because the next
run will try the initialiser again instead of proceeding with a global that