Skip to content

Commit

Permalink
Test that "sideways" br_on_casts are not allowed
Browse files Browse the repository at this point in the history
I had intended this to be included in WebAssembly#424, but better late than never.
  • Loading branch information
tlively committed Sep 12, 2023
1 parent bc304c5 commit 121f084
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/core/gc/br_on_cast.wast
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,11 @@
)
"type mismatch"
)
(assert_invalid
(module
(func (result anyref)
(br_on_cast 0 structref arrayref (unreachable))
)
)
"type mismatch"
)
8 changes: 8 additions & 0 deletions test/core/gc/br_on_cast_fail.wast
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,11 @@
)
"type mismatch"
)
(assert_invalid
(module
(func (result anyref)
(br_on_cast_fail 0 structref arrayref (unreachable))
)
)
"type mismatch"
)

0 comments on commit 121f084

Please sign in to comment.