Skip to content

Commit

Permalink
Add tests that call_ref does not accept funcref
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Jul 10, 2024
1 parent caf5877 commit 4a5218b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/core/call_ref.wast
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,13 @@
)
"type mismatch"
)

(assert_invalid
(module
(type $t (func))
(func $f (param $r funcref)
(call_ref $t (local.get $r))
)
)
"type mismatch"
)
10 changes: 10 additions & 0 deletions test/core/return_call_ref.wast
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,16 @@
"type mismatch"
)

(assert_invalid
(module
(type $t (func))
(func $f (param $r funcref)
(return_call_ref $t (local.get $r))
)
)
"type mismatch"
)

(assert_invalid
(module
(type $ty (func (result i32 i32)))
Expand Down

0 comments on commit 4a5218b

Please sign in to comment.