;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.

;; Check that if we emit a binary without custom descriptors enabled, the exact
;; types are generalized to be inexact.

;; RUN: wasm-opt %s -all --disable-custom-descriptors -g -o %t.noexact.wasm
;; RUN: wasm-opt %t.noexact.wasm -all -S -o - | filecheck %s

(module
  ;; CHECK:      (type $foo (struct (field (ref null $foo)) (field (ref $foo))))
  (type $foo (struct (field (ref null (exact $foo)) (ref (exact $foo)))))

  ;; CHECK:      (type $1 (func (param (ref $foo))))

  ;; CHECK:      (global $g (ref null $foo) (ref.null none))
  (global $g (ref null (exact $foo)) (ref.null none))

  ;; CHECK:      (func $f (type $1) (param $0 (ref $foo))
  ;; CHECK-NEXT:  (local $1 (ref null $foo))
  ;; CHECK-NEXT: )
  (func $f (param (ref (exact $foo)))
    (local (ref null (exact $foo)))
  )
)
