blob: 8b0b54ee0be3095623a0d0e4277c8cd1aeaf51c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
;; Test the combination of 'return_call' with legacy exception handling.
(module
(tag $t)
(func $test (export "test") (result i32)
(try (result i32)
(do
(call $return-call-in-try)
)
(catch_all
;; Catch the exception thrown from $return-callee.
(i32.const 42)
)
)
)
(func $return-call-in-try (result i32)
(try (result i32)
(do
(return_call $return-callee)
)
(catch_all
(unreachable)
)
)
)
(func $return-callee (result i32)
(throw $t)
)
)
(assert_return (invoke "test") (i32.const 42))
|