summaryrefslogtreecommitdiff
path: root/test/spec/ref_eq.wast
blob: a5224834cdf1b85c78f87d81341a1c092b391b28 (plain)
1
2
3
4
5
6
7
8
9
10
11
(module
  (func $compare (export "compare") (param $x eqref) (param $y eqref) (result i32)
    (ref.eq
      (local.get $x)
      (local.get $y)
    )
  )
)

;; All nulls compare equal, regardless of their type.
(assert_return (invoke "compare" (ref.null none) (ref.null eq)) (i32.const 1))