Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test return_call*s to callees that return more values than the caller does #116

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion test/core/return_call.wast
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,15 @@
)
"type mismatch"
)

(assert_invalid
(module
(func $f (result i32 i32) unreachable)
(func (result i32)
return_call $f
)
)
"type mismatch"
)

;; Unbound function

Expand Down
12 changes: 11 additions & 1 deletion test/core/return_call_indirect.wast
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,17 @@
)
"type mismatch"
)

(assert_invalid
(module
(type $ty (func (result i32 i32)))
(import "env" "table" (table $table 0 funcref))
(func (param i32) (result i32)
local.get 0
return_call_indirect $table (type $ty)
)
)
"type mismatch"
)

;; Unbound type

Expand Down
11 changes: 11 additions & 0 deletions test/core/return_call_ref.wast
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,14 @@
)
"type mismatch"
)

(assert_invalid
(module
(type $ty (func (result i32 i32)))
(func (param funcref) (result i32)
local.get 0
return_call_ref $ty
)
)
"type mismatch"
)
Loading