summaryrefslogtreecommitdiff
path: root/test/exception-handling.wast.from-wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/exception-handling.wast.from-wast')
-rw-r--r--test/exception-handling.wast.from-wast14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/exception-handling.wast.from-wast b/test/exception-handling.wast.from-wast
index da9a1031e..7e7bec6ff 100644
--- a/test/exception-handling.wast.from-wast
+++ b/test/exception-handling.wast.from-wast
@@ -4,6 +4,7 @@
(type $2 (func (param i64)))
(type $3 (func (param i32 i64)))
(type $4 (func (param eqref)))
+ (type $5 (func (result exnref)))
(tag $e-i32 (param i32))
(tag $e-i64 (param i64))
(tag $e-i32-i64 (param i32 i64))
@@ -406,4 +407,17 @@
)
(nop)
)
+ (func $exnref-test (type $5) (result exnref)
+ (local $exn exnref)
+ (local $null-exn nullexnref)
+ (if (result exnref)
+ (i32.const 1)
+ (if (result nullexnref)
+ (i32.const 1)
+ (local.get $null-exn)
+ (ref.null noexn)
+ )
+ (local.get $exn)
+ )
+ )
)