diff --git a/test/core/stack-switching/cont.wast b/test/core/stack-switching/cont.wast index 81007cfc..3695edf3 100644 --- a/test/core/stack-switching/cont.wast +++ b/test/core/stack-switching/cont.wast @@ -242,6 +242,27 @@ (type $c2 (cont $f2)) ) +(assert_invalid + (module + (rec + (type $fA (func)) + (type $fB (func)) + (type $cont (cont $fA)) + ) + (elem declare func $b) + (func $a + (drop + (cont.new $cont ;; expects a ref of $fA, not $fB + (ref.func $b) + ) + ) + ) + (func $b (type $fB) + ) + ) + "type mismatch") + + ;; Test resume_throw used on the very first execution of a continuation (so the ;; code in the continuation function is never reached). (module