Various test assertions require the testsuite runner implementation to understand the type matching logic, for example:
(module
(global $null nullref (ref.null none))
(func (export "anyref") (result anyref) (global.get $null))
)
(assert_return (invoke "anyref") (ref.null any))
(assert_return (invoke "anyref") (ref.null none))
Any code computing assert_return would need to understand that ref.null any matches ref.null none, which is a little odd as now the test itself is dependant on working matching code. Ideally the test assertions would simply be testing equality, and the actual wasm code would perform a computation that proves the type matching is correct. Thoughts?