Skip to content

Commit

Permalink
Add tests that call_ref does not accept funcref (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Jul 11, 2024
1 parent caf5877 commit e852978
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 e852978

Please sign in to comment.