From d1f3b7dda41e7146fba776f2c4825427de265118 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 15 Aug 2025 10:20:39 -0700 Subject: [PATCH] Add a test for resuming a null continuation --- test/core/stack-switching/cont.wast | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/core/stack-switching/cont.wast b/test/core/stack-switching/cont.wast index 29c48488..4289d6c1 100644 --- a/test/core/stack-switching/cont.wast +++ b/test/core/stack-switching/cont.wast @@ -116,6 +116,12 @@ (func (export "non-linear-4") (call $nl4 (cont.new $k1 (ref.func $r1))) ) + + (func (export "null") + (resume $k1 + (ref.null $k1) + ) + ) ) (assert_suspension (invoke "unhandled-1") "unhandled") @@ -132,6 +138,8 @@ (assert_trap (invoke "non-linear-3") "continuation already consumed") (assert_trap (invoke "non-linear-4") "continuation already consumed") +(assert_trap (invoke "null") "null continuation reference") + (assert_invalid (module (type $ft (func))