Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Type matching logic in test suite assertions #572

@CharlieTap

Description

@CharlieTap

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions