From 2c92b6603ba285c50abcd29d20651103f69f2475 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 10 Jul 2024 14:47:37 -0700 Subject: [PATCH] Add tests that call_ref does not accept funcref --- test/core/call_ref.wast | 10 ++++++++++ test/core/return_call_ref.wast | 10 ++++++++++ 2 files changed, 20 insertions(+) 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 2b495f46e..ef278ae38 100644 --- a/test/core/return_call_ref.wast +++ b/test/core/return_call_ref.wast @@ -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" +)