Skip to content

Commit 0f7a95a

Browse files
committed
Test catch subtyping
1 parent 0696965 commit 0f7a95a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/core/try_table.wast

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,3 +370,21 @@
370370
)
371371
"type mismatch"
372372
)
373+
374+
375+
(module
376+
(type $t (func))
377+
(func $dummy)
378+
(elem declare func $dummy)
379+
380+
(tag $e (param (ref $t)))
381+
(func $throw (throw $e (ref.func $dummy)))
382+
(func (export "run") (result (ref null $t))
383+
(block $l (result (ref null $t))
384+
(try_table (catch $e $l) (call $throw))
385+
(unreachable)
386+
)
387+
)
388+
)
389+
390+
(assert_return (invoke "run") (ref.func))

0 commit comments

Comments
 (0)