Skip to content
Merged
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
23 changes: 23 additions & 0 deletions test/core/call_indirect.wast
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,15 @@
"type mismatch"
)

;; call_indirect expects funcref type but receives externref
(assert_invalid
(module
(type (func))
(table 10 externref)
(func $call-indirect (call_indirect (type 0) (i32.const 0)))
)
"type mismatch"
)

;; Unbound type

Expand All @@ -1008,6 +1017,20 @@
"unknown type"
)

;; pass very large number to call_indirect
(assert_invalid
(module
(type (func (param i32)))
(table 1 funcref)
(func $conditional-dangling-type
(if (i32.const 1)
(then (call_indirect (type 0xffffffff) (i32.const 0)))
)
)
)
"unknown type"
)


;; Unbound function in table

Expand Down
Loading