;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; RUN: wasm-opt %s -all --minimize-rec-groups -S -o - | filecheck %s

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

  ;; If we didn't differentiate between exact and inexact types, there would be
  ;; an assertion failure on adding these public types to the set of public
  ;; shapes.
  ;; CHECK:      (import "" "exact" (global $exact (ref null $exact)))
  (import "" "exact" (global $exact (ref null $exact)))
  ;; CHECK:      (import "" "inexact" (global $inexact (ref null $inexact)))
  (import "" "inexact" (global $inexact (ref null $inexact)))
)
