diff --git a/test/core/throw.wast b/test/core/throw.wast index d53b5b55..2148d5ea 100644 --- a/test/core/throw.wast +++ b/test/core/throw.wast @@ -20,6 +20,10 @@ (func (export "throw-param-f64") (param f64) (local.get 0) (throw $e-f64)) + (func (export "throw-polymorphic") (throw $e0) (throw $e-i32)) + + (func (export "throw-polymorphic-block") (block (result i32) (throw $e0)) (throw $e-i32)) + (func $throw-1-2 (i32.const 1) (i32.const 2) (throw $e-i32-i32)) (func (export "test-throw-1-2") (try @@ -42,6 +46,9 @@ (assert_exception (invoke "throw-param-i64" (i64.const 5))) (assert_exception (invoke "throw-param-f64" (f64.const 5.0))) +(assert_exception (invoke "throw-polymorphic")) +(assert_exception (invoke "throw-polymorphic-block")) + (assert_return (invoke "test-throw-1-2")) (assert_invalid (module (func (throw 0))) "unknown tag 0")