diff --git a/test/core/call_ref.wast b/test/core/call_ref.wast index da480a7f2..aa9ac7b87 100644 --- a/test/core/call_ref.wast +++ b/test/core/call_ref.wast @@ -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" +) diff --git a/test/core/return_call_ref.wast b/test/core/return_call_ref.wast index 1d7e2755c..5f5a7cba7 100644 --- a/test/core/return_call_ref.wast +++ b/test/core/return_call_ref.wast @@ -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)))