Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 5d31ec1

Browse files
authored
Merge pull request #424 from WebAssembly/test-br-on-cast-types
Test that br_on_cast{_fail} must do a down cast
2 parents 5d2313b + c27610d commit 5d31ec1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/core/gc/br_on_cast.wast

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,11 @@
249249
)
250250
"type mismatch"
251251
)
252+
(assert_invalid
253+
(module
254+
(func (result anyref)
255+
(br_on_cast 0 eqref anyref (unreachable))
256+
)
257+
)
258+
"type mismatch"
259+
)

test/core/gc/br_on_cast_fail.wast

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,11 @@
264264
)
265265
"type mismatch"
266266
)
267+
(assert_invalid
268+
(module
269+
(func (result anyref)
270+
(br_on_cast_fail 0 eqref anyref (unreachable))
271+
)
272+
)
273+
"type mismatch"
274+
)

0 commit comments

Comments
 (0)