;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. ;; RUN: wasm-opt %s -all --roundtrip -S -o - | filecheck %s (module ;; CHECK: (type $none (func)) (type $none (func)) ;; CHECK: (func $foo (type $none) ;; CHECK-NEXT: (local $0 (tuple funcref (ref $none))) ;; CHECK-NEXT: (local $1 funcref) ;; CHECK-NEXT: (local.set $0 ;; CHECK-NEXT: (block $label$1 (type $1) (result funcref (ref $none)) ;; CHECK-NEXT: (tuple.make 2 ;; CHECK-NEXT: (ref.null nofunc) ;; CHECK-NEXT: (ref.func $foo) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (block (result funcref) ;; CHECK-NEXT: (local.set $1 ;; CHECK-NEXT: (tuple.extract 2 0 ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (tuple.extract 2 1 ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $foo (tuple.drop 2 ;; a tuple type with a non-nullable element, that must be carefully handled (block $block (result funcref (ref $none)) (tuple.make 2 (ref.null func) (ref.func $foo) ) ) ) ) )