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 e19c032 commit 2c92b66
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 @@ -374,3 +374,13 @@
)
"type mismatch"
)

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

0 comments on commit 2c92b66

Please sign in to comment.