;; Heap types
func
funcref
(ref func)
any
anyref
(ref any)
eq
eqref
(ref eq)
i31
i31ref
(ref i31)
(func)
(type $struct.0 (struct))
(type $array.0 (array i32))

;; Signature
(func)
(ref $func.0)
(ref null $func.0)
(func (param i32) (result f64))
(ref $func.0)
(ref null $func.0)

;; Struct
(type $struct.0 (struct))
(ref $struct.0)
(ref null $struct.0)
(type $struct.0 (struct (field i32) (field i64) (field (mut f32)) (field (mut f64))))
(ref $struct.0)
(ref null $struct.0)

;; Array
(array i32)
(ref $array.0)
(ref null $array.0)
(array (mut i64))
(ref $array.0)
(ref null $array.0)

;; Tuple
(tuple)
none
(tuple i32 f64)
(tuple i32 f64)

;; Signature of references (param/result)
(func (param (ref null $struct.0)) (result (ref $array.0)))

;; Signature of references (params/results)
(func (param (ref null $struct.0) (ref $array.0)) (result (ref $struct.0) (ref null $array.1)))

;; Struct of references
(type $struct.0 (struct (field (ref $func.0)) (field (mut (ref $func.0))) (field (ref null $func.0)) (field (mut (ref null $func.0)))))
(ref $struct.0)
(ref null $struct.0)
(type $struct.0 (struct (field (ref $struct.1)) (field (mut (ref $struct.1))) (field (ref null $struct.1)) (field (mut (ref null $struct.1)))))
(ref $struct.0)
(ref null $struct.0)
(type $struct.0 (struct (field (ref $array.0)) (field (mut (ref $array.0))) (field (ref null $array.0)) (field (mut (ref null $array.0)))))
(ref $struct.0)
(ref null $struct.0)
(type $struct.0 (struct (field (mut i32)) (field (mut (ref null $func.0))) (field (mut (ref null $struct.1))) (field (mut (ref null $array.0)))))
(ref $struct.0)
(ref null $struct.0)

;; Array of references
(array (ref null $func.0))
(ref $array.0)
(ref null $array.0)
(array (mut (ref null $struct.0)))
(ref $array.0)
(ref null $array.0)
(array (ref null $array.0))
(ref $array.0)
(ref null $array.0)

;; Tuple of references
(tuple (ref $func.0) (ref null $func.0) (ref $struct.0) (ref null $struct.0) (ref $array.0) (ref null $array.0))
(tuple (ref $func.0) (ref null $func.0) (ref $struct.0) (ref null $struct.0) (ref $array.0) (ref null $array.0))

;; Recursive (not really)
(func (param (ref $func.0)))
(ref $func.0)
(func (param (ref $array.0)))
(ref $func.0)
