tuple_pattern.carbon 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/destroy.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/tuple/tuple_pattern.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/tuple_pattern.carbon
  12. // --- basic.carbon
  13. library "[[@TEST_NAME]]";
  14. fn F() {
  15. //@dump-sem-ir-begin
  16. let (x: {}, y: {}) = ({}, {});
  17. var (a: {}, b: {});
  18. var (c: {}, d: {}) = ({}, {});
  19. //@dump-sem-ir-end
  20. }
  21. // --- variable.carbon
  22. library "[[@TEST_NAME]]";
  23. fn F() {
  24. //@dump-sem-ir-begin
  25. var tuple: ({}, {}) = ({}, {});
  26. var (x: {}, y: {}) = tuple;
  27. //@dump-sem-ir-end
  28. }
  29. fn G() {
  30. //@dump-sem-ir-begin
  31. let tuple: ({}, {}) = ({}, {});
  32. var (x: {}, y: {}) = tuple;
  33. //@dump-sem-ir-end
  34. }
  35. fn MakeTuple() -> ({}, {});
  36. fn H() {
  37. //@dump-sem-ir-begin
  38. var (x: {}, y: {}) = MakeTuple();
  39. //@dump-sem-ir-end
  40. }
  41. // --- nested.carbon
  42. library "[[@TEST_NAME]]";
  43. fn F() {
  44. //@dump-sem-ir-begin
  45. let (x: {}, (y: {}, z: {})) = ({}, ({}, {}));
  46. //@dump-sem-ir-end
  47. }
  48. // --- package_scope.carbon
  49. library "[[@TEST_NAME]]";
  50. //@dump-sem-ir-begin
  51. let (x: {}, y: {}) = ({}, {});
  52. //@dump-sem-ir-end
  53. // --- fail_in_class.carbon
  54. library "[[@TEST_NAME]]";
  55. class C {
  56. // CHECK:STDERR: fail_in_class.carbon:[[@LINE+8]]:7: error: expected identifier in field declaration [ExpectedFieldIdentifier]
  57. // CHECK:STDERR: var (x: {}, y: {});
  58. // CHECK:STDERR: ^
  59. // CHECK:STDERR:
  60. // CHECK:STDERR: fail_in_class.carbon:[[@LINE+4]]:3: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
  61. // CHECK:STDERR: var (x: {}, y: {});
  62. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
  63. // CHECK:STDERR:
  64. var (x: {}, y: {});
  65. }
  66. // --- fail_initializer_mismatch.carbon
  67. library "[[@TEST_NAME]]";
  68. // CHECK:STDERR: fail_initializer_mismatch.carbon:[[@LINE+4]]:5: error: tuple pattern expects 2 elements, but tuple literal has 1 [TuplePatternSizeDoesntMatchLiteral]
  69. // CHECK:STDERR: let (x: {}, y: {}) = ({},);
  70. // CHECK:STDERR: ^~~~~~~~~~~~~~
  71. // CHECK:STDERR:
  72. let (x: {}, y: {}) = ({},);
  73. // CHECK:STDERR: fail_initializer_mismatch.carbon:[[@LINE+4]]:5: error: tuple pattern expects 2 elements, but tuple literal has 3 [TuplePatternSizeDoesntMatchLiteral]
  74. // CHECK:STDERR: let (a: {}, b: {}) = ({}, {}, {});
  75. // CHECK:STDERR: ^~~~~~~~~~~~~~
  76. // CHECK:STDERR:
  77. let (a: {}, b: {}) = ({}, {}, {});
  78. // CHECK:STDOUT: --- basic.carbon
  79. // CHECK:STDOUT:
  80. // CHECK:STDOUT: constants {
  81. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  82. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  83. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  84. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  85. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  86. // CHECK:STDOUT: %pattern_type.de4: type = pattern_type %tuple.type.b6b [concrete]
  87. // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete]
  88. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  89. // CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.b6b, () [concrete]
  90. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.504: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
  91. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.766: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.504 = struct_value () [concrete]
  92. // CHECK:STDOUT: }
  93. // CHECK:STDOUT:
  94. // CHECK:STDOUT: imports {
  95. // CHECK:STDOUT: }
  96. // CHECK:STDOUT:
  97. // CHECK:STDOUT: fn @F() {
  98. // CHECK:STDOUT: !entry:
  99. // CHECK:STDOUT: name_binding_decl {
  100. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
  101. // CHECK:STDOUT: %y.patt: %pattern_type.a96 = value_binding_pattern y [concrete]
  102. // CHECK:STDOUT: %.loc6_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
  103. // CHECK:STDOUT: }
  104. // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  105. // CHECK:STDOUT: %.loc6_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  106. // CHECK:STDOUT: %.loc6_31: %tuple.type.b6b = tuple_literal (%.loc6_26.1, %.loc6_30.1) [concrete = constants.%tuple]
  107. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_struct_type] {
  108. // CHECK:STDOUT: %.loc6_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  109. // CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  110. // CHECK:STDOUT: }
  111. // CHECK:STDOUT: %empty_struct.loc6_26: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  112. // CHECK:STDOUT: %.loc6_26.2: %empty_struct_type = converted %.loc6_26.1, %empty_struct.loc6_26 [concrete = constants.%empty_struct]
  113. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc6_26.2
  114. // CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_struct_type] {
  115. // CHECK:STDOUT: %.loc6_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  116. // CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  117. // CHECK:STDOUT: }
  118. // CHECK:STDOUT: %empty_struct.loc6_30: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  119. // CHECK:STDOUT: %.loc6_30.2: %empty_struct_type = converted %.loc6_30.1, %empty_struct.loc6_30 [concrete = constants.%empty_struct]
  120. // CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc6_30.2
  121. // CHECK:STDOUT: name_binding_decl {
  122. // CHECK:STDOUT: %a.patt: %pattern_type.a96 = ref_binding_pattern a [concrete]
  123. // CHECK:STDOUT: %b.patt: %pattern_type.a96 = ref_binding_pattern b [concrete]
  124. // CHECK:STDOUT: %.loc7_20: %pattern_type.de4 = tuple_pattern (%a.patt, %b.patt) [concrete]
  125. // CHECK:STDOUT: %.var_patt.loc7: %pattern_type.de4 = var_pattern %.loc7_20 [concrete]
  126. // CHECK:STDOUT: }
  127. // CHECK:STDOUT: %.var.loc7: ref %tuple.type.b6b = var %.var_patt.loc7
  128. // CHECK:STDOUT: %tuple.elem0.loc7: ref %empty_struct_type = tuple_access %.var.loc7, element0
  129. // CHECK:STDOUT: %tuple.elem1.loc7: ref %empty_struct_type = tuple_access %.var.loc7, element1
  130. // CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.3 [concrete = constants.%empty_struct_type] {
  131. // CHECK:STDOUT: %.loc7_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  132. // CHECK:STDOUT: %.loc7_12.3: type = converted %.loc7_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  133. // CHECK:STDOUT: }
  134. // CHECK:STDOUT: %a: ref %empty_struct_type = ref_binding a, %tuple.elem0.loc7
  135. // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] {
  136. // CHECK:STDOUT: %.loc7_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  137. // CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  138. // CHECK:STDOUT: }
  139. // CHECK:STDOUT: %b: ref %empty_struct_type = ref_binding b, %tuple.elem1.loc7
  140. // CHECK:STDOUT: name_binding_decl {
  141. // CHECK:STDOUT: %c.patt: %pattern_type.a96 = ref_binding_pattern c [concrete]
  142. // CHECK:STDOUT: %d.patt: %pattern_type.a96 = ref_binding_pattern d [concrete]
  143. // CHECK:STDOUT: %.loc8_20: %pattern_type.de4 = tuple_pattern (%c.patt, %d.patt) [concrete]
  144. // CHECK:STDOUT: %.var_patt.loc8: %pattern_type.de4 = var_pattern %.loc8_20 [concrete]
  145. // CHECK:STDOUT: }
  146. // CHECK:STDOUT: %.var.loc8: ref %tuple.type.b6b = var %.var_patt.loc8
  147. // CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  148. // CHECK:STDOUT: %.loc8_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  149. // CHECK:STDOUT: %.loc8_31.1: %tuple.type.b6b = tuple_literal (%.loc8_26.1, %.loc8_30.1) [concrete = constants.%tuple]
  150. // CHECK:STDOUT: %tuple.elem0.loc8_31: ref %empty_struct_type = tuple_access %.var.loc8, element0
  151. // CHECK:STDOUT: %.loc8_26.2: init %empty_struct_type = struct_init () to %tuple.elem0.loc8_31 [concrete = constants.%empty_struct]
  152. // CHECK:STDOUT: %.loc8_31.2: init %empty_struct_type = converted %.loc8_26.1, %.loc8_26.2 [concrete = constants.%empty_struct]
  153. // CHECK:STDOUT: %tuple.elem1.loc8_31: ref %empty_struct_type = tuple_access %.var.loc8, element1
  154. // CHECK:STDOUT: %.loc8_30.2: init %empty_struct_type = struct_init () to %tuple.elem1.loc8_31 [concrete = constants.%empty_struct]
  155. // CHECK:STDOUT: %.loc8_31.3: init %empty_struct_type = converted %.loc8_30.1, %.loc8_30.2 [concrete = constants.%empty_struct]
  156. // CHECK:STDOUT: %.loc8_31.4: init %tuple.type.b6b = tuple_init (%.loc8_31.2, %.loc8_31.3) to %.var.loc8 [concrete = constants.%tuple]
  157. // CHECK:STDOUT: %.loc8_3: init %tuple.type.b6b = converted %.loc8_31.1, %.loc8_31.4 [concrete = constants.%tuple]
  158. // CHECK:STDOUT: assign %.var.loc8, %.loc8_3
  159. // CHECK:STDOUT: %tuple.elem0.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element0
  160. // CHECK:STDOUT: %tuple.elem1.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element1
  161. // CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.3 [concrete = constants.%empty_struct_type] {
  162. // CHECK:STDOUT: %.loc8_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  163. // CHECK:STDOUT: %.loc8_12.3: type = converted %.loc8_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  164. // CHECK:STDOUT: }
  165. // CHECK:STDOUT: %c: ref %empty_struct_type = ref_binding c, %tuple.elem0.loc8_3
  166. // CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [concrete = constants.%empty_struct_type] {
  167. // CHECK:STDOUT: %.loc8_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  168. // CHECK:STDOUT: %.loc8_19.3: type = converted %.loc8_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT: %d: ref %empty_struct_type = ref_binding d, %tuple.elem1.loc8_3
  171. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc8: <bound method> = bound_method %.var.loc8, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.766
  172. // CHECK:STDOUT: <elided>
  173. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %.var.loc8, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  174. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8(%.var.loc8)
  175. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc7: <bound method> = bound_method %.var.loc7, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.766
  176. // CHECK:STDOUT: <elided>
  177. // CHECK:STDOUT: %bound_method.loc7: <bound method> = bound_method %.var.loc7, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  178. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%.var.loc7)
  179. // CHECK:STDOUT: <elided>
  180. // CHECK:STDOUT: }
  181. // CHECK:STDOUT:
  182. // CHECK:STDOUT: --- variable.carbon
  183. // CHECK:STDOUT:
  184. // CHECK:STDOUT: constants {
  185. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  186. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  187. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  188. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  189. // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete]
  190. // CHECK:STDOUT: %pattern_type.de4: type = pattern_type %tuple.type.b6b [concrete]
  191. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  192. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  193. // CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type.b6b, () [concrete]
  194. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.504: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [concrete]
  195. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.766: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.504 = struct_value () [concrete]
  196. // CHECK:STDOUT: %MakeTuple.type: type = fn_type @MakeTuple [concrete]
  197. // CHECK:STDOUT: %MakeTuple: %MakeTuple.type = struct_value () [concrete]
  198. // CHECK:STDOUT: }
  199. // CHECK:STDOUT:
  200. // CHECK:STDOUT: imports {
  201. // CHECK:STDOUT: }
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: fn @F() {
  204. // CHECK:STDOUT: !entry:
  205. // CHECK:STDOUT: name_binding_decl {
  206. // CHECK:STDOUT: %tuple.patt: %pattern_type.de4 = ref_binding_pattern tuple [concrete]
  207. // CHECK:STDOUT: %tuple.var_patt: %pattern_type.de4 = var_pattern %tuple.patt [concrete]
  208. // CHECK:STDOUT: }
  209. // CHECK:STDOUT: %tuple.var: ref %tuple.type.b6b = var %tuple.var_patt
  210. // CHECK:STDOUT: %.loc6_27.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  211. // CHECK:STDOUT: %.loc6_31.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  212. // CHECK:STDOUT: %.loc6_32.1: %tuple.type.b6b = tuple_literal (%.loc6_27.1, %.loc6_31.1) [concrete = constants.%tuple]
  213. // CHECK:STDOUT: %tuple.elem0.loc6: ref %empty_struct_type = tuple_access %tuple.var, element0
  214. // CHECK:STDOUT: %.loc6_27.2: init %empty_struct_type = struct_init () to %tuple.elem0.loc6 [concrete = constants.%empty_struct]
  215. // CHECK:STDOUT: %.loc6_32.2: init %empty_struct_type = converted %.loc6_27.1, %.loc6_27.2 [concrete = constants.%empty_struct]
  216. // CHECK:STDOUT: %tuple.elem1.loc6: ref %empty_struct_type = tuple_access %tuple.var, element1
  217. // CHECK:STDOUT: %.loc6_31.2: init %empty_struct_type = struct_init () to %tuple.elem1.loc6 [concrete = constants.%empty_struct]
  218. // CHECK:STDOUT: %.loc6_32.3: init %empty_struct_type = converted %.loc6_31.1, %.loc6_31.2 [concrete = constants.%empty_struct]
  219. // CHECK:STDOUT: %.loc6_32.4: init %tuple.type.b6b = tuple_init (%.loc6_32.2, %.loc6_32.3) to %tuple.var [concrete = constants.%tuple]
  220. // CHECK:STDOUT: %.loc6_3: init %tuple.type.b6b = converted %.loc6_32.1, %.loc6_32.4 [concrete = constants.%tuple]
  221. // CHECK:STDOUT: assign %tuple.var, %.loc6_3
  222. // CHECK:STDOUT: %.loc6_21.1: type = splice_block %.loc6_21.5 [concrete = constants.%tuple.type.b6b] {
  223. // CHECK:STDOUT: %.loc6_16: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  224. // CHECK:STDOUT: %.loc6_20: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  225. // CHECK:STDOUT: %.loc6_21.2: %tuple.type.b6b = tuple_literal (%.loc6_16, %.loc6_20) [concrete = constants.%tuple]
  226. // CHECK:STDOUT: %.loc6_21.3: type = converted constants.%empty_struct, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  227. // CHECK:STDOUT: %.loc6_21.4: type = converted constants.%empty_struct, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  228. // CHECK:STDOUT: %.loc6_21.5: type = converted %.loc6_21.2, constants.%tuple.type.b6b [concrete = constants.%tuple.type.b6b]
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: %tuple: ref %tuple.type.b6b = ref_binding tuple, %tuple.var
  231. // CHECK:STDOUT: name_binding_decl {
  232. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = ref_binding_pattern x [concrete]
  233. // CHECK:STDOUT: %y.patt: %pattern_type.a96 = ref_binding_pattern y [concrete]
  234. // CHECK:STDOUT: %.loc7_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
  235. // CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc7_20 [concrete]
  236. // CHECK:STDOUT: }
  237. // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt
  238. // CHECK:STDOUT: %tuple.ref: ref %tuple.type.b6b = name_ref tuple, %tuple
  239. // CHECK:STDOUT: %tuple.elem0.loc7_24.1: ref %empty_struct_type = tuple_access %tuple.ref, element0
  240. // CHECK:STDOUT: %tuple.elem0.loc7_24.2: ref %empty_struct_type = tuple_access %.var, element0
  241. // CHECK:STDOUT: %.loc7_24.1: init %empty_struct_type = struct_init () to %tuple.elem0.loc7_24.2 [concrete = constants.%empty_struct]
  242. // CHECK:STDOUT: %.loc7_24.2: init %empty_struct_type = converted %tuple.elem0.loc7_24.1, %.loc7_24.1 [concrete = constants.%empty_struct]
  243. // CHECK:STDOUT: %tuple.elem1.loc7_24.1: ref %empty_struct_type = tuple_access %tuple.ref, element1
  244. // CHECK:STDOUT: %tuple.elem1.loc7_24.2: ref %empty_struct_type = tuple_access %.var, element1
  245. // CHECK:STDOUT: %.loc7_24.3: init %empty_struct_type = struct_init () to %tuple.elem1.loc7_24.2 [concrete = constants.%empty_struct]
  246. // CHECK:STDOUT: %.loc7_24.4: init %empty_struct_type = converted %tuple.elem1.loc7_24.1, %.loc7_24.3 [concrete = constants.%empty_struct]
  247. // CHECK:STDOUT: %.loc7_24.5: init %tuple.type.b6b = tuple_init (%.loc7_24.2, %.loc7_24.4) to %.var [concrete = constants.%tuple]
  248. // CHECK:STDOUT: %.loc7_3: init %tuple.type.b6b = converted %tuple.ref, %.loc7_24.5 [concrete = constants.%tuple]
  249. // CHECK:STDOUT: assign %.var, %.loc7_3
  250. // CHECK:STDOUT: %tuple.elem0.loc7_3: ref %empty_struct_type = tuple_access %.var, element0
  251. // CHECK:STDOUT: %tuple.elem1.loc7_3: ref %empty_struct_type = tuple_access %.var, element1
  252. // CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.3 [concrete = constants.%empty_struct_type] {
  253. // CHECK:STDOUT: %.loc7_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  254. // CHECK:STDOUT: %.loc7_12.3: type = converted %.loc7_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  255. // CHECK:STDOUT: }
  256. // CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0.loc7_3
  257. // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] {
  258. // CHECK:STDOUT: %.loc7_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  259. // CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  260. // CHECK:STDOUT: }
  261. // CHECK:STDOUT: %y: ref %empty_struct_type = ref_binding y, %tuple.elem1.loc7_3
  262. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc7: <bound method> = bound_method %.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.766
  263. // CHECK:STDOUT: <elided>
  264. // CHECK:STDOUT: %bound_method.loc7: <bound method> = bound_method %.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  265. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7(%.var)
  266. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc6: <bound method> = bound_method %tuple.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.766
  267. // CHECK:STDOUT: <elided>
  268. // CHECK:STDOUT: %bound_method.loc6: <bound method> = bound_method %tuple.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  269. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc6: init %empty_tuple.type = call %bound_method.loc6(%tuple.var)
  270. // CHECK:STDOUT: <elided>
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: fn @G() {
  274. // CHECK:STDOUT: !entry:
  275. // CHECK:STDOUT: name_binding_decl {
  276. // CHECK:STDOUT: %tuple.patt: %pattern_type.de4 = value_binding_pattern tuple [concrete]
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT: %.loc13_27: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  279. // CHECK:STDOUT: %.loc13_31: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  280. // CHECK:STDOUT: %.loc13_32.1: %tuple.type.b6b = tuple_literal (%.loc13_27, %.loc13_31) [concrete = constants.%tuple]
  281. // CHECK:STDOUT: %.loc13_21.1: type = splice_block %.loc13_21.5 [concrete = constants.%tuple.type.b6b] {
  282. // CHECK:STDOUT: %.loc13_16: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  283. // CHECK:STDOUT: %.loc13_20: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  284. // CHECK:STDOUT: %.loc13_21.2: %tuple.type.b6b = tuple_literal (%.loc13_16, %.loc13_20) [concrete = constants.%tuple]
  285. // CHECK:STDOUT: %.loc13_21.3: type = converted constants.%empty_struct, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  286. // CHECK:STDOUT: %.loc13_21.4: type = converted constants.%empty_struct, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  287. // CHECK:STDOUT: %.loc13_21.5: type = converted %.loc13_21.2, constants.%tuple.type.b6b [concrete = constants.%tuple.type.b6b]
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT: %empty_struct.loc13_27: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  290. // CHECK:STDOUT: %.loc13_32.2: %empty_struct_type = converted %.loc13_27, %empty_struct.loc13_27 [concrete = constants.%empty_struct]
  291. // CHECK:STDOUT: %empty_struct.loc13_31: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  292. // CHECK:STDOUT: %.loc13_32.3: %empty_struct_type = converted %.loc13_31, %empty_struct.loc13_31 [concrete = constants.%empty_struct]
  293. // CHECK:STDOUT: %tuple.loc13_32: %tuple.type.b6b = tuple_value (%.loc13_32.2, %.loc13_32.3) [concrete = constants.%tuple]
  294. // CHECK:STDOUT: %.loc13_32.4: %tuple.type.b6b = converted %.loc13_32.1, %tuple.loc13_32 [concrete = constants.%tuple]
  295. // CHECK:STDOUT: %tuple.loc13_7: %tuple.type.b6b = value_binding tuple, %.loc13_32.4
  296. // CHECK:STDOUT: name_binding_decl {
  297. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = ref_binding_pattern x [concrete]
  298. // CHECK:STDOUT: %y.patt: %pattern_type.a96 = ref_binding_pattern y [concrete]
  299. // CHECK:STDOUT: %.loc14_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
  300. // CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc14_20 [concrete]
  301. // CHECK:STDOUT: }
  302. // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt
  303. // CHECK:STDOUT: %tuple.ref: %tuple.type.b6b = name_ref tuple, %tuple.loc13_7
  304. // CHECK:STDOUT: %tuple.elem0.loc14_24.1: %empty_struct_type = tuple_access %tuple.ref, element0
  305. // CHECK:STDOUT: %tuple.elem0.loc14_24.2: ref %empty_struct_type = tuple_access %.var, element0
  306. // CHECK:STDOUT: %.loc14_24.1: init %empty_struct_type = struct_init () to %tuple.elem0.loc14_24.2 [concrete = constants.%empty_struct]
  307. // CHECK:STDOUT: %.loc14_24.2: init %empty_struct_type = converted %tuple.elem0.loc14_24.1, %.loc14_24.1 [concrete = constants.%empty_struct]
  308. // CHECK:STDOUT: %tuple.elem1.loc14_24.1: %empty_struct_type = tuple_access %tuple.ref, element1
  309. // CHECK:STDOUT: %tuple.elem1.loc14_24.2: ref %empty_struct_type = tuple_access %.var, element1
  310. // CHECK:STDOUT: %.loc14_24.3: init %empty_struct_type = struct_init () to %tuple.elem1.loc14_24.2 [concrete = constants.%empty_struct]
  311. // CHECK:STDOUT: %.loc14_24.4: init %empty_struct_type = converted %tuple.elem1.loc14_24.1, %.loc14_24.3 [concrete = constants.%empty_struct]
  312. // CHECK:STDOUT: %.loc14_24.5: init %tuple.type.b6b = tuple_init (%.loc14_24.2, %.loc14_24.4) to %.var [concrete = constants.%tuple]
  313. // CHECK:STDOUT: %.loc14_3: init %tuple.type.b6b = converted %tuple.ref, %.loc14_24.5 [concrete = constants.%tuple]
  314. // CHECK:STDOUT: assign %.var, %.loc14_3
  315. // CHECK:STDOUT: %tuple.elem0.loc14_3: ref %empty_struct_type = tuple_access %.var, element0
  316. // CHECK:STDOUT: %tuple.elem1.loc14_3: ref %empty_struct_type = tuple_access %.var, element1
  317. // CHECK:STDOUT: %.loc14_12.1: type = splice_block %.loc14_12.3 [concrete = constants.%empty_struct_type] {
  318. // CHECK:STDOUT: %.loc14_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  319. // CHECK:STDOUT: %.loc14_12.3: type = converted %.loc14_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  320. // CHECK:STDOUT: }
  321. // CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0.loc14_3
  322. // CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.3 [concrete = constants.%empty_struct_type] {
  323. // CHECK:STDOUT: %.loc14_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  324. // CHECK:STDOUT: %.loc14_19.3: type = converted %.loc14_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  325. // CHECK:STDOUT: }
  326. // CHECK:STDOUT: %y: ref %empty_struct_type = ref_binding y, %tuple.elem1.loc14_3
  327. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.766
  328. // CHECK:STDOUT: <elided>
  329. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
  330. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%.var)
  331. // CHECK:STDOUT: <elided>
  332. // CHECK:STDOUT: }
  333. // CHECK:STDOUT:
  334. // CHECK:STDOUT: fn @H() {
  335. // CHECK:STDOUT: !entry:
  336. // CHECK:STDOUT: name_binding_decl {
  337. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = ref_binding_pattern x [concrete]
  338. // CHECK:STDOUT: %y.patt: %pattern_type.a96 = ref_binding_pattern y [concrete]
  339. // CHECK:STDOUT: %.loc22_20: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
  340. // CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc22_20 [concrete]
  341. // CHECK:STDOUT: }
  342. // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var %.var_patt
  343. // CHECK:STDOUT: %MakeTuple.ref: %MakeTuple.type = name_ref MakeTuple, file.%MakeTuple.decl [concrete = constants.%MakeTuple]
  344. // CHECK:STDOUT: %.loc22_3: ref %tuple.type.b6b = splice_block %.var {}
  345. // CHECK:STDOUT: %MakeTuple.call: init %tuple.type.b6b = call %MakeTuple.ref() to %.loc22_3
  346. // CHECK:STDOUT: assign %.var, %MakeTuple.call
  347. // CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %.var, element0
  348. // CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %.var, element1
  349. // CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%empty_struct_type] {
  350. // CHECK:STDOUT: %.loc22_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  351. // CHECK:STDOUT: %.loc22_12.3: type = converted %.loc22_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  352. // CHECK:STDOUT: }
  353. // CHECK:STDOUT: %x: ref %empty_struct_type = ref_binding x, %tuple.elem0
  354. // CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%empty_struct_type] {
  355. // CHECK:STDOUT: %.loc22_19.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  356. // CHECK:STDOUT: %.loc22_19.3: type = converted %.loc22_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT: %y: ref %empty_struct_type = ref_binding y, %tuple.elem1
  359. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: <bound method> = bound_method %.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.766
  360. // CHECK:STDOUT: <elided>
  361. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn
  362. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method(%.var)
  363. // CHECK:STDOUT: <elided>
  364. // CHECK:STDOUT: }
  365. // CHECK:STDOUT:
  366. // CHECK:STDOUT: --- nested.carbon
  367. // CHECK:STDOUT:
  368. // CHECK:STDOUT: constants {
  369. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  370. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  371. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  372. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  373. // CHECK:STDOUT: %pattern_type.de4: type = pattern_type %tuple.type.b6b [concrete]
  374. // CHECK:STDOUT: %tuple.type.6ca: type = tuple_type (%empty_struct_type, %tuple.type.b6b) [concrete]
  375. // CHECK:STDOUT: %pattern_type.361: type = pattern_type %tuple.type.6ca [concrete]
  376. // CHECK:STDOUT: %tuple.9a3: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete]
  377. // CHECK:STDOUT: %tuple.56c: %tuple.type.6ca = tuple_value (%empty_struct, %tuple.9a3) [concrete]
  378. // CHECK:STDOUT: }
  379. // CHECK:STDOUT:
  380. // CHECK:STDOUT: imports {
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT:
  383. // CHECK:STDOUT: fn @F() {
  384. // CHECK:STDOUT: !entry:
  385. // CHECK:STDOUT: name_binding_decl {
  386. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
  387. // CHECK:STDOUT: %y.patt: %pattern_type.a96 = value_binding_pattern y [concrete]
  388. // CHECK:STDOUT: %z.patt: %pattern_type.a96 = value_binding_pattern z [concrete]
  389. // CHECK:STDOUT: %.loc6_28: %pattern_type.de4 = tuple_pattern (%y.patt, %z.patt) [concrete]
  390. // CHECK:STDOUT: %.loc6_29: %pattern_type.361 = tuple_pattern (%x.patt, %.loc6_28) [concrete]
  391. // CHECK:STDOUT: }
  392. // CHECK:STDOUT: %.loc6_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  393. // CHECK:STDOUT: %.loc6_40.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  394. // CHECK:STDOUT: %.loc6_44.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  395. // CHECK:STDOUT: %.loc6_45: %tuple.type.b6b = tuple_literal (%.loc6_40.1, %.loc6_44.1) [concrete = constants.%tuple.9a3]
  396. // CHECK:STDOUT: %.loc6_46: %tuple.type.6ca = tuple_literal (%.loc6_35.1, %.loc6_45) [concrete = constants.%tuple.56c]
  397. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_struct_type] {
  398. // CHECK:STDOUT: %.loc6_12.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  399. // CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  400. // CHECK:STDOUT: }
  401. // CHECK:STDOUT: %empty_struct.loc6_35: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  402. // CHECK:STDOUT: %.loc6_35.2: %empty_struct_type = converted %.loc6_35.1, %empty_struct.loc6_35 [concrete = constants.%empty_struct]
  403. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc6_35.2
  404. // CHECK:STDOUT: %.loc6_20.1: type = splice_block %.loc6_20.3 [concrete = constants.%empty_struct_type] {
  405. // CHECK:STDOUT: %.loc6_20.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  406. // CHECK:STDOUT: %.loc6_20.3: type = converted %.loc6_20.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  407. // CHECK:STDOUT: }
  408. // CHECK:STDOUT: %empty_struct.loc6_40: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  409. // CHECK:STDOUT: %.loc6_40.2: %empty_struct_type = converted %.loc6_40.1, %empty_struct.loc6_40 [concrete = constants.%empty_struct]
  410. // CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc6_40.2
  411. // CHECK:STDOUT: %.loc6_27.1: type = splice_block %.loc6_27.3 [concrete = constants.%empty_struct_type] {
  412. // CHECK:STDOUT: %.loc6_27.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  413. // CHECK:STDOUT: %.loc6_27.3: type = converted %.loc6_27.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  414. // CHECK:STDOUT: }
  415. // CHECK:STDOUT: %empty_struct.loc6_44: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  416. // CHECK:STDOUT: %.loc6_44.2: %empty_struct_type = converted %.loc6_44.1, %empty_struct.loc6_44 [concrete = constants.%empty_struct]
  417. // CHECK:STDOUT: %z: %empty_struct_type = value_binding z, %.loc6_44.2
  418. // CHECK:STDOUT: <elided>
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT:
  421. // CHECK:STDOUT: --- package_scope.carbon
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: constants {
  424. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  425. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  426. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  427. // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  428. // CHECK:STDOUT: %pattern_type.de4: type = pattern_type %tuple.type [concrete]
  429. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_struct, %empty_struct) [concrete]
  430. // CHECK:STDOUT: }
  431. // CHECK:STDOUT:
  432. // CHECK:STDOUT: imports {
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: file {
  436. // CHECK:STDOUT: name_binding_decl {
  437. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
  438. // CHECK:STDOUT: %y.patt: %pattern_type.a96 = value_binding_pattern y [concrete]
  439. // CHECK:STDOUT: %.loc5_18: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete]
  440. // CHECK:STDOUT: }
  441. // CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_struct_type] {
  442. // CHECK:STDOUT: %.loc5_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  443. // CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  444. // CHECK:STDOUT: }
  445. // CHECK:STDOUT: %empty_struct.loc5_24: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  446. // CHECK:STDOUT: %.loc5_24: %empty_struct_type = converted @__global_init.%.loc5_24, %empty_struct.loc5_24 [concrete = constants.%empty_struct]
  447. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %.loc5_24
  448. // CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.3 [concrete = constants.%empty_struct_type] {
  449. // CHECK:STDOUT: %.loc5_17.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  450. // CHECK:STDOUT: %.loc5_17.3: type = converted %.loc5_17.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  451. // CHECK:STDOUT: }
  452. // CHECK:STDOUT: %empty_struct.loc5_28: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  453. // CHECK:STDOUT: %.loc5_28: %empty_struct_type = converted @__global_init.%.loc5_28, %empty_struct.loc5_28 [concrete = constants.%empty_struct]
  454. // CHECK:STDOUT: %y: %empty_struct_type = value_binding y, %.loc5_28
  455. // CHECK:STDOUT: }
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: fn @__global_init() {
  458. // CHECK:STDOUT: !entry:
  459. // CHECK:STDOUT: %.loc5_24: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  460. // CHECK:STDOUT: %.loc5_28: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  461. // CHECK:STDOUT: %.loc5_29: %tuple.type = tuple_literal (%.loc5_24, %.loc5_28) [concrete = constants.%tuple]
  462. // CHECK:STDOUT: <elided>
  463. // CHECK:STDOUT: }
  464. // CHECK:STDOUT: