diff options
Diffstat (limited to 'test/exception-handling.wast')
-rw-r--r-- | test/exception-handling.wast | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/exception-handling.wast b/test/exception-handling.wast index c608e860a..cd436296b 100644 --- a/test/exception-handling.wast +++ b/test/exception-handling.wast @@ -2,6 +2,7 @@ (tag $e-i32 (param i32)) (tag $e-i64 (param i64)) (tag $e-i32-i64 (param i32 i64)) + (tag $e-anyref (param anyref)) (tag $e-empty) (func $foo) @@ -311,4 +312,29 @@ ) ) ) + + (func $pop_test + (try + (do) + (catch $e-i32 + (throw $e-i32 + (if (result i32) + ;; pop is within an if condition, so this is OK. + (pop i32) + (i32.const 0) + (i32.const 3) + ) + ) + ) + ) + + (try + (do) + (catch $e-anyref + (drop + (pop funcref) ;; pop can be subtype + ) + ) + ) + ) ) |