tuple_pattern.carbon 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/tuple/no_prelude/tuple_pattern.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/no_prelude/tuple_pattern.carbon
  10. // --- basic.carbon
  11. library "[[@TEST_NAME]]";
  12. fn F() {
  13. let (x: {}, y: {}) = ({}, {});
  14. var (a: {}, b: {});
  15. var (c: {}, d: {}) = ({}, {});
  16. }
  17. // --- variable.carbon
  18. library "[[@TEST_NAME]]";
  19. fn F() {
  20. var tuple: ({}, {}) = ({}, {});
  21. var (x: {}, y: {}) = tuple;
  22. }
  23. fn G() {
  24. let tuple: ({}, {}) = ({}, {});
  25. var (x: {}, y: {}) = tuple;
  26. }
  27. fn MakeTuple() -> ({}, {});
  28. fn H() {
  29. var (x: {}, y: {}) = MakeTuple();
  30. }
  31. // --- nested.carbon
  32. library "[[@TEST_NAME]]";
  33. fn F() {
  34. let (x: {}, (y: {}, z: {})) = ({}, ({}, {}));
  35. }
  36. // --- package_scope.carbon
  37. library "[[@TEST_NAME]]";
  38. let (x: {}, y: {}) = ({}, {});
  39. // --- fail_in_interface.carbon
  40. library "[[@TEST_NAME]]";
  41. interface I {
  42. // CHECK:STDERR: fail_in_interface.carbon:[[@LINE+4]]:7: error: pattern in associated constant declaration must be a single `:!` binding [ExpectedSymbolicBindingInAssociatedConstant]
  43. // CHECK:STDERR: let (x: {}, y: {});
  44. // CHECK:STDERR: ^~~~~~~~~~~~~~
  45. // CHECK:STDERR:
  46. let (x: {}, y: {});
  47. }
  48. // --- fail_in_class.carbon
  49. library "[[@TEST_NAME]]";
  50. class C {
  51. // CHECK:STDERR: fail_in_class.carbon:[[@LINE+8]]:7: error: expected identifier in field declaration [ExpectedFieldIdentifier]
  52. // CHECK:STDERR: var (x: {}, y: {});
  53. // CHECK:STDERR: ^
  54. // CHECK:STDERR:
  55. // CHECK:STDERR: fail_in_class.carbon:[[@LINE+4]]:3: error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
  56. // CHECK:STDERR: var (x: {}, y: {});
  57. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
  58. // CHECK:STDERR:
  59. var (x: {}, y: {});
  60. }
  61. // --- fail_initializer_mismatch.carbon
  62. library "[[@TEST_NAME]]";
  63. // CHECK:STDERR: fail_initializer_mismatch.carbon:[[@LINE+4]]:5: error: tuple pattern expects 2 elements, but tuple literal has 1 [TuplePatternSizeDoesntMatchLiteral]
  64. // CHECK:STDERR: let (x: {}, y: {}) = ({},);
  65. // CHECK:STDERR: ^~~~~~~~~~~~~~
  66. // CHECK:STDERR:
  67. let (x: {}, y: {}) = ({},);
  68. // CHECK:STDERR: fail_initializer_mismatch.carbon:[[@LINE+4]]:5: error: tuple pattern expects 2 elements, but tuple literal has 3 [TuplePatternSizeDoesntMatchLiteral]
  69. // CHECK:STDERR: let (a: {}, b: {}) = ({}, {}, {});
  70. // CHECK:STDERR: ^~~~~~~~~~~~~~
  71. // CHECK:STDERR:
  72. let (a: {}, b: {}) = ({}, {}, {});
  73. // CHECK:STDOUT: --- basic.carbon
  74. // CHECK:STDOUT:
  75. // CHECK:STDOUT: constants {
  76. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  77. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  78. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  79. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  80. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  81. // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete]
  82. // CHECK:STDOUT: }
  83. // CHECK:STDOUT:
  84. // CHECK:STDOUT: file {
  85. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  86. // CHECK:STDOUT: .F = %F.decl
  87. // CHECK:STDOUT: }
  88. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  89. // CHECK:STDOUT: }
  90. // CHECK:STDOUT:
  91. // CHECK:STDOUT: fn @F() {
  92. // CHECK:STDOUT: !entry:
  93. // CHECK:STDOUT: name_binding_decl {
  94. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  95. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  96. // CHECK:STDOUT: %.loc5_20: %tuple.type.b6b = tuple_pattern (%x.patt, %y.patt)
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal ()
  99. // CHECK:STDOUT: %.loc5_30.1: %empty_struct_type = struct_literal ()
  100. // CHECK:STDOUT: %.loc5_31: %tuple.type.b6b = tuple_literal (%.loc5_26.1, %.loc5_30.1)
  101. // CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.3 [concrete = constants.%empty_struct_type] {
  102. // CHECK:STDOUT: %.loc5_12.2: %empty_struct_type = struct_literal ()
  103. // CHECK:STDOUT: %.loc5_12.3: type = converted %.loc5_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  104. // CHECK:STDOUT: }
  105. // CHECK:STDOUT: %empty_struct.loc5_26: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  106. // CHECK:STDOUT: %.loc5_26.2: %empty_struct_type = converted %.loc5_26.1, %empty_struct.loc5_26 [concrete = constants.%empty_struct]
  107. // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %.loc5_26.2
  108. // CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.3 [concrete = constants.%empty_struct_type] {
  109. // CHECK:STDOUT: %.loc5_19.2: %empty_struct_type = struct_literal ()
  110. // CHECK:STDOUT: %.loc5_19.3: type = converted %.loc5_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  111. // CHECK:STDOUT: }
  112. // CHECK:STDOUT: %empty_struct.loc5_30: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  113. // CHECK:STDOUT: %.loc5_30.2: %empty_struct_type = converted %.loc5_30.1, %empty_struct.loc5_30 [concrete = constants.%empty_struct]
  114. // CHECK:STDOUT: %y: %empty_struct_type = bind_name y, %.loc5_30.2
  115. // CHECK:STDOUT: name_binding_decl {
  116. // CHECK:STDOUT: %a.patt: %empty_struct_type = binding_pattern a
  117. // CHECK:STDOUT: %b.patt: %empty_struct_type = binding_pattern b
  118. // CHECK:STDOUT: %.loc6_20: %tuple.type.b6b = tuple_pattern (%a.patt, %b.patt)
  119. // CHECK:STDOUT: %.loc6_3: %tuple.type.b6b = var_pattern %.loc6_20
  120. // CHECK:STDOUT: }
  121. // CHECK:STDOUT: %.var.loc6: ref %tuple.type.b6b = var <none>
  122. // CHECK:STDOUT: %tuple.elem0.loc6: ref %empty_struct_type = tuple_access %.var.loc6, element0
  123. // CHECK:STDOUT: %tuple.elem1.loc6: ref %empty_struct_type = tuple_access %.var.loc6, element1
  124. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_struct_type] {
  125. // CHECK:STDOUT: %.loc6_12.2: %empty_struct_type = struct_literal ()
  126. // CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  127. // CHECK:STDOUT: }
  128. // CHECK:STDOUT: %a: ref %empty_struct_type = bind_name a, %tuple.elem0.loc6
  129. // CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_struct_type] {
  130. // CHECK:STDOUT: %.loc6_19.2: %empty_struct_type = struct_literal ()
  131. // CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  132. // CHECK:STDOUT: }
  133. // CHECK:STDOUT: %b: ref %empty_struct_type = bind_name b, %tuple.elem1.loc6
  134. // CHECK:STDOUT: name_binding_decl {
  135. // CHECK:STDOUT: %c.patt: %empty_struct_type = binding_pattern c
  136. // CHECK:STDOUT: %d.patt: %empty_struct_type = binding_pattern d
  137. // CHECK:STDOUT: %.loc7_20: %tuple.type.b6b = tuple_pattern (%c.patt, %d.patt)
  138. // CHECK:STDOUT: %.loc7_3.1: %tuple.type.b6b = var_pattern %.loc7_20
  139. // CHECK:STDOUT: }
  140. // CHECK:STDOUT: %.var.loc7: ref %tuple.type.b6b = var <none>
  141. // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal ()
  142. // CHECK:STDOUT: %.loc7_30.1: %empty_struct_type = struct_literal ()
  143. // CHECK:STDOUT: %.loc7_31.1: %tuple.type.b6b = tuple_literal (%.loc7_26.1, %.loc7_30.1)
  144. // CHECK:STDOUT: %tuple.elem0.loc7_31: ref %empty_struct_type = tuple_access %.var.loc7, element0
  145. // CHECK:STDOUT: %.loc7_26.2: init %empty_struct_type = struct_init () to %tuple.elem0.loc7_31 [concrete = constants.%empty_struct]
  146. // CHECK:STDOUT: %.loc7_31.2: init %empty_struct_type = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%empty_struct]
  147. // CHECK:STDOUT: %tuple.elem1.loc7_31: ref %empty_struct_type = tuple_access %.var.loc7, element1
  148. // CHECK:STDOUT: %.loc7_30.2: init %empty_struct_type = struct_init () to %tuple.elem1.loc7_31 [concrete = constants.%empty_struct]
  149. // CHECK:STDOUT: %.loc7_31.3: init %empty_struct_type = converted %.loc7_30.1, %.loc7_30.2 [concrete = constants.%empty_struct]
  150. // CHECK:STDOUT: %.loc7_31.4: init %tuple.type.b6b = tuple_init (%.loc7_31.2, %.loc7_31.3) to %.var.loc7 [concrete = constants.%tuple]
  151. // CHECK:STDOUT: %.loc7_3.2: init %tuple.type.b6b = converted %.loc7_31.1, %.loc7_31.4 [concrete = constants.%tuple]
  152. // CHECK:STDOUT: assign %.var.loc7, %.loc7_3.2
  153. // CHECK:STDOUT: %tuple.elem0.loc7_3: ref %empty_struct_type = tuple_access %.var.loc7, element0
  154. // CHECK:STDOUT: %tuple.elem1.loc7_3: ref %empty_struct_type = tuple_access %.var.loc7, element1
  155. // CHECK:STDOUT: %.loc7_12.1: type = splice_block %.loc7_12.3 [concrete = constants.%empty_struct_type] {
  156. // CHECK:STDOUT: %.loc7_12.2: %empty_struct_type = struct_literal ()
  157. // CHECK:STDOUT: %.loc7_12.3: type = converted %.loc7_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  158. // CHECK:STDOUT: }
  159. // CHECK:STDOUT: %c: ref %empty_struct_type = bind_name c, %tuple.elem0.loc7_3
  160. // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] {
  161. // CHECK:STDOUT: %.loc7_19.2: %empty_struct_type = struct_literal ()
  162. // CHECK:STDOUT: %.loc7_19.3: type = converted %.loc7_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT: %d: ref %empty_struct_type = bind_name d, %tuple.elem1.loc7_3
  165. // CHECK:STDOUT: return
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT:
  168. // CHECK:STDOUT: --- variable.carbon
  169. // CHECK:STDOUT:
  170. // CHECK:STDOUT: constants {
  171. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  172. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  173. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  174. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  175. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  176. // CHECK:STDOUT: %tuple: %tuple.type.b6b = tuple_value (%empty_struct, %empty_struct) [concrete]
  177. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  178. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  179. // CHECK:STDOUT: %MakeTuple.type: type = fn_type @MakeTuple [concrete]
  180. // CHECK:STDOUT: %MakeTuple: %MakeTuple.type = struct_value () [concrete]
  181. // CHECK:STDOUT: %H.type: type = fn_type @H [concrete]
  182. // CHECK:STDOUT: %H: %H.type = struct_value () [concrete]
  183. // CHECK:STDOUT: }
  184. // CHECK:STDOUT:
  185. // CHECK:STDOUT: file {
  186. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  187. // CHECK:STDOUT: .F = %F.decl
  188. // CHECK:STDOUT: .G = %G.decl
  189. // CHECK:STDOUT: .MakeTuple = %MakeTuple.decl
  190. // CHECK:STDOUT: .H = %H.decl
  191. // CHECK:STDOUT: }
  192. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  193. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
  194. // CHECK:STDOUT: %MakeTuple.decl: %MakeTuple.type = fn_decl @MakeTuple [concrete = constants.%MakeTuple] {
  195. // CHECK:STDOUT: %return.patt: %tuple.type.b6b = return_slot_pattern
  196. // CHECK:STDOUT: %return.param_patt: %tuple.type.b6b = out_param_pattern %return.patt, call_param0
  197. // CHECK:STDOUT: } {
  198. // CHECK:STDOUT: %.loc14_21: %empty_struct_type = struct_literal ()
  199. // CHECK:STDOUT: %.loc14_25: %empty_struct_type = struct_literal ()
  200. // CHECK:STDOUT: %.loc14_26.1: %tuple.type.b6b = tuple_literal (%.loc14_21, %.loc14_25)
  201. // CHECK:STDOUT: %.loc14_26.2: type = converted %.loc14_21, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  202. // CHECK:STDOUT: %.loc14_26.3: type = converted %.loc14_25, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  203. // CHECK:STDOUT: %.loc14_26.4: type = converted %.loc14_26.1, constants.%tuple.type.b6b [concrete = constants.%tuple.type.b6b]
  204. // CHECK:STDOUT: %return.param: ref %tuple.type.b6b = out_param call_param0
  205. // CHECK:STDOUT: %return: ref %tuple.type.b6b = return_slot %return.param
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} {}
  208. // CHECK:STDOUT: }
  209. // CHECK:STDOUT:
  210. // CHECK:STDOUT: fn @F() {
  211. // CHECK:STDOUT: !entry:
  212. // CHECK:STDOUT: name_binding_decl {
  213. // CHECK:STDOUT: %tuple.patt: %tuple.type.b6b = binding_pattern tuple
  214. // CHECK:STDOUT: %.loc5_3.1: %tuple.type.b6b = var_pattern %tuple.patt
  215. // CHECK:STDOUT: }
  216. // CHECK:STDOUT: %tuple.var: ref %tuple.type.b6b = var tuple
  217. // CHECK:STDOUT: %.loc5_27.1: %empty_struct_type = struct_literal ()
  218. // CHECK:STDOUT: %.loc5_31.1: %empty_struct_type = struct_literal ()
  219. // CHECK:STDOUT: %.loc5_32.1: %tuple.type.b6b = tuple_literal (%.loc5_27.1, %.loc5_31.1)
  220. // CHECK:STDOUT: %tuple.elem0.loc5: ref %empty_struct_type = tuple_access %tuple.var, element0
  221. // CHECK:STDOUT: %.loc5_27.2: init %empty_struct_type = struct_init () to %tuple.elem0.loc5 [concrete = constants.%empty_struct]
  222. // CHECK:STDOUT: %.loc5_32.2: init %empty_struct_type = converted %.loc5_27.1, %.loc5_27.2 [concrete = constants.%empty_struct]
  223. // CHECK:STDOUT: %tuple.elem1.loc5: ref %empty_struct_type = tuple_access %tuple.var, element1
  224. // CHECK:STDOUT: %.loc5_31.2: init %empty_struct_type = struct_init () to %tuple.elem1.loc5 [concrete = constants.%empty_struct]
  225. // CHECK:STDOUT: %.loc5_32.3: init %empty_struct_type = converted %.loc5_31.1, %.loc5_31.2 [concrete = constants.%empty_struct]
  226. // CHECK:STDOUT: %.loc5_32.4: init %tuple.type.b6b = tuple_init (%.loc5_32.2, %.loc5_32.3) to %tuple.var [concrete = constants.%tuple]
  227. // CHECK:STDOUT: %.loc5_3.2: init %tuple.type.b6b = converted %.loc5_32.1, %.loc5_32.4 [concrete = constants.%tuple]
  228. // CHECK:STDOUT: assign %tuple.var, %.loc5_3.2
  229. // CHECK:STDOUT: %.loc5_21.1: type = splice_block %.loc5_21.5 [concrete = constants.%tuple.type.b6b] {
  230. // CHECK:STDOUT: %.loc5_16: %empty_struct_type = struct_literal ()
  231. // CHECK:STDOUT: %.loc5_20: %empty_struct_type = struct_literal ()
  232. // CHECK:STDOUT: %.loc5_21.2: %tuple.type.b6b = tuple_literal (%.loc5_16, %.loc5_20)
  233. // CHECK:STDOUT: %.loc5_21.3: type = converted %.loc5_16, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  234. // CHECK:STDOUT: %.loc5_21.4: type = converted %.loc5_20, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  235. // CHECK:STDOUT: %.loc5_21.5: type = converted %.loc5_21.2, constants.%tuple.type.b6b [concrete = constants.%tuple.type.b6b]
  236. // CHECK:STDOUT: }
  237. // CHECK:STDOUT: %tuple: ref %tuple.type.b6b = bind_name tuple, %tuple.var
  238. // CHECK:STDOUT: name_binding_decl {
  239. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  240. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  241. // CHECK:STDOUT: %.loc6_20: %tuple.type.b6b = tuple_pattern (%x.patt, %y.patt)
  242. // CHECK:STDOUT: %.loc6_3.1: %tuple.type.b6b = var_pattern %.loc6_20
  243. // CHECK:STDOUT: }
  244. // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var <none>
  245. // CHECK:STDOUT: %tuple.ref: ref %tuple.type.b6b = name_ref tuple, %tuple
  246. // CHECK:STDOUT: %tuple.elem0.loc6_24.1: ref %empty_struct_type = tuple_access %tuple.ref, element0
  247. // CHECK:STDOUT: %tuple.elem0.loc6_24.2: ref %empty_struct_type = tuple_access %.var, element0
  248. // CHECK:STDOUT: %.loc6_24.1: init %empty_struct_type = struct_init () to %tuple.elem0.loc6_24.2 [concrete = constants.%empty_struct]
  249. // CHECK:STDOUT: %.loc6_24.2: init %empty_struct_type = converted %tuple.elem0.loc6_24.1, %.loc6_24.1 [concrete = constants.%empty_struct]
  250. // CHECK:STDOUT: %tuple.elem1.loc6_24.1: ref %empty_struct_type = tuple_access %tuple.ref, element1
  251. // CHECK:STDOUT: %tuple.elem1.loc6_24.2: ref %empty_struct_type = tuple_access %.var, element1
  252. // CHECK:STDOUT: %.loc6_24.3: init %empty_struct_type = struct_init () to %tuple.elem1.loc6_24.2 [concrete = constants.%empty_struct]
  253. // CHECK:STDOUT: %.loc6_24.4: init %empty_struct_type = converted %tuple.elem1.loc6_24.1, %.loc6_24.3 [concrete = constants.%empty_struct]
  254. // CHECK:STDOUT: %.loc6_24.5: init %tuple.type.b6b = tuple_init (%.loc6_24.2, %.loc6_24.4) to %.var [concrete = constants.%tuple]
  255. // CHECK:STDOUT: %.loc6_3.2: init %tuple.type.b6b = converted %tuple.ref, %.loc6_24.5 [concrete = constants.%tuple]
  256. // CHECK:STDOUT: assign %.var, %.loc6_3.2
  257. // CHECK:STDOUT: %tuple.elem0.loc6_3: ref %empty_struct_type = tuple_access %.var, element0
  258. // CHECK:STDOUT: %tuple.elem1.loc6_3: ref %empty_struct_type = tuple_access %.var, element1
  259. // CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_struct_type] {
  260. // CHECK:STDOUT: %.loc6_12.2: %empty_struct_type = struct_literal ()
  261. // CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  262. // CHECK:STDOUT: }
  263. // CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %tuple.elem0.loc6_3
  264. // CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_struct_type] {
  265. // CHECK:STDOUT: %.loc6_19.2: %empty_struct_type = struct_literal ()
  266. // CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  267. // CHECK:STDOUT: }
  268. // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1.loc6_3
  269. // CHECK:STDOUT: return
  270. // CHECK:STDOUT: }
  271. // CHECK:STDOUT:
  272. // CHECK:STDOUT: fn @G() {
  273. // CHECK:STDOUT: !entry:
  274. // CHECK:STDOUT: name_binding_decl {
  275. // CHECK:STDOUT: %tuple.patt: %tuple.type.b6b = binding_pattern tuple
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT: %.loc10_27: %empty_struct_type = struct_literal ()
  278. // CHECK:STDOUT: %.loc10_31: %empty_struct_type = struct_literal ()
  279. // CHECK:STDOUT: %.loc10_32.1: %tuple.type.b6b = tuple_literal (%.loc10_27, %.loc10_31)
  280. // CHECK:STDOUT: %.loc10_21.1: type = splice_block %.loc10_21.5 [concrete = constants.%tuple.type.b6b] {
  281. // CHECK:STDOUT: %.loc10_16: %empty_struct_type = struct_literal ()
  282. // CHECK:STDOUT: %.loc10_20: %empty_struct_type = struct_literal ()
  283. // CHECK:STDOUT: %.loc10_21.2: %tuple.type.b6b = tuple_literal (%.loc10_16, %.loc10_20)
  284. // CHECK:STDOUT: %.loc10_21.3: type = converted %.loc10_16, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  285. // CHECK:STDOUT: %.loc10_21.4: type = converted %.loc10_20, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  286. // CHECK:STDOUT: %.loc10_21.5: type = converted %.loc10_21.2, constants.%tuple.type.b6b [concrete = constants.%tuple.type.b6b]
  287. // CHECK:STDOUT: }
  288. // CHECK:STDOUT: %empty_struct.loc10_27: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  289. // CHECK:STDOUT: %.loc10_32.2: %empty_struct_type = converted %.loc10_27, %empty_struct.loc10_27 [concrete = constants.%empty_struct]
  290. // CHECK:STDOUT: %empty_struct.loc10_31: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  291. // CHECK:STDOUT: %.loc10_32.3: %empty_struct_type = converted %.loc10_31, %empty_struct.loc10_31 [concrete = constants.%empty_struct]
  292. // CHECK:STDOUT: %tuple.loc10_32: %tuple.type.b6b = tuple_value (%.loc10_32.2, %.loc10_32.3) [concrete = constants.%tuple]
  293. // CHECK:STDOUT: %.loc10_32.4: %tuple.type.b6b = converted %.loc10_32.1, %tuple.loc10_32 [concrete = constants.%tuple]
  294. // CHECK:STDOUT: %tuple.loc10_7: %tuple.type.b6b = bind_name tuple, %.loc10_32.4
  295. // CHECK:STDOUT: name_binding_decl {
  296. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  297. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  298. // CHECK:STDOUT: %.loc11_20: %tuple.type.b6b = tuple_pattern (%x.patt, %y.patt)
  299. // CHECK:STDOUT: %.loc11_3.1: %tuple.type.b6b = var_pattern %.loc11_20
  300. // CHECK:STDOUT: }
  301. // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var <none>
  302. // CHECK:STDOUT: %tuple.ref: %tuple.type.b6b = name_ref tuple, %tuple.loc10_7
  303. // CHECK:STDOUT: %tuple.elem0.loc11_24.1: %empty_struct_type = tuple_access %tuple.ref, element0
  304. // CHECK:STDOUT: %tuple.elem0.loc11_24.2: ref %empty_struct_type = tuple_access %.var, element0
  305. // CHECK:STDOUT: %.loc11_24.1: init %empty_struct_type = struct_init () to %tuple.elem0.loc11_24.2 [concrete = constants.%empty_struct]
  306. // CHECK:STDOUT: %.loc11_24.2: init %empty_struct_type = converted %tuple.elem0.loc11_24.1, %.loc11_24.1 [concrete = constants.%empty_struct]
  307. // CHECK:STDOUT: %tuple.elem1.loc11_24.1: %empty_struct_type = tuple_access %tuple.ref, element1
  308. // CHECK:STDOUT: %tuple.elem1.loc11_24.2: ref %empty_struct_type = tuple_access %.var, element1
  309. // CHECK:STDOUT: %.loc11_24.3: init %empty_struct_type = struct_init () to %tuple.elem1.loc11_24.2 [concrete = constants.%empty_struct]
  310. // CHECK:STDOUT: %.loc11_24.4: init %empty_struct_type = converted %tuple.elem1.loc11_24.1, %.loc11_24.3 [concrete = constants.%empty_struct]
  311. // CHECK:STDOUT: %.loc11_24.5: init %tuple.type.b6b = tuple_init (%.loc11_24.2, %.loc11_24.4) to %.var [concrete = constants.%tuple]
  312. // CHECK:STDOUT: %.loc11_3.2: init %tuple.type.b6b = converted %tuple.ref, %.loc11_24.5 [concrete = constants.%tuple]
  313. // CHECK:STDOUT: assign %.var, %.loc11_3.2
  314. // CHECK:STDOUT: %tuple.elem0.loc11_3: ref %empty_struct_type = tuple_access %.var, element0
  315. // CHECK:STDOUT: %tuple.elem1.loc11_3: ref %empty_struct_type = tuple_access %.var, element1
  316. // CHECK:STDOUT: %.loc11_12.1: type = splice_block %.loc11_12.3 [concrete = constants.%empty_struct_type] {
  317. // CHECK:STDOUT: %.loc11_12.2: %empty_struct_type = struct_literal ()
  318. // CHECK:STDOUT: %.loc11_12.3: type = converted %.loc11_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %tuple.elem0.loc11_3
  321. // CHECK:STDOUT: %.loc11_19.1: type = splice_block %.loc11_19.3 [concrete = constants.%empty_struct_type] {
  322. // CHECK:STDOUT: %.loc11_19.2: %empty_struct_type = struct_literal ()
  323. // CHECK:STDOUT: %.loc11_19.3: type = converted %.loc11_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1.loc11_3
  326. // CHECK:STDOUT: return
  327. // CHECK:STDOUT: }
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: fn @MakeTuple() -> %return.param: %tuple.type.b6b;
  330. // CHECK:STDOUT:
  331. // CHECK:STDOUT: fn @H() {
  332. // CHECK:STDOUT: !entry:
  333. // CHECK:STDOUT: name_binding_decl {
  334. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  335. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  336. // CHECK:STDOUT: %.loc17_20: %tuple.type.b6b = tuple_pattern (%x.patt, %y.patt)
  337. // CHECK:STDOUT: %.loc17_3.1: %tuple.type.b6b = var_pattern %.loc17_20
  338. // CHECK:STDOUT: }
  339. // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var <none>
  340. // CHECK:STDOUT: %MakeTuple.ref: %MakeTuple.type = name_ref MakeTuple, file.%MakeTuple.decl [concrete = constants.%MakeTuple]
  341. // CHECK:STDOUT: %.loc17_3.2: ref %tuple.type.b6b = splice_block %.var {}
  342. // CHECK:STDOUT: %MakeTuple.call: init %tuple.type.b6b = call %MakeTuple.ref() to %.loc17_3.2
  343. // CHECK:STDOUT: assign %.var, %MakeTuple.call
  344. // CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %.var, element0
  345. // CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %.var, element1
  346. // CHECK:STDOUT: %.loc17_12.1: type = splice_block %.loc17_12.3 [concrete = constants.%empty_struct_type] {
  347. // CHECK:STDOUT: %.loc17_12.2: %empty_struct_type = struct_literal ()
  348. // CHECK:STDOUT: %.loc17_12.3: type = converted %.loc17_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  349. // CHECK:STDOUT: }
  350. // CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %tuple.elem0
  351. // CHECK:STDOUT: %.loc17_19.1: type = splice_block %.loc17_19.3 [concrete = constants.%empty_struct_type] {
  352. // CHECK:STDOUT: %.loc17_19.2: %empty_struct_type = struct_literal ()
  353. // CHECK:STDOUT: %.loc17_19.3: type = converted %.loc17_19.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  354. // CHECK:STDOUT: }
  355. // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %tuple.elem1
  356. // CHECK:STDOUT: return
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT:
  359. // CHECK:STDOUT: --- nested.carbon
  360. // CHECK:STDOUT:
  361. // CHECK:STDOUT: constants {
  362. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  363. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  364. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  365. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  366. // CHECK:STDOUT: %tuple.type.6ca: type = tuple_type (%empty_struct_type, %tuple.type.b6b) [concrete]
  367. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  368. // CHECK:STDOUT: }
  369. // CHECK:STDOUT:
  370. // CHECK:STDOUT: file {
  371. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  372. // CHECK:STDOUT: .F = %F.decl
  373. // CHECK:STDOUT: }
  374. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  375. // CHECK:STDOUT: }
  376. // CHECK:STDOUT:
  377. // CHECK:STDOUT: fn @F() {
  378. // CHECK:STDOUT: !entry:
  379. // CHECK:STDOUT: name_binding_decl {
  380. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  381. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  382. // CHECK:STDOUT: %z.patt: %empty_struct_type = binding_pattern z
  383. // CHECK:STDOUT: %.loc5_28: %tuple.type.b6b = tuple_pattern (%y.patt, %z.patt)
  384. // CHECK:STDOUT: %.loc5_29: %tuple.type.6ca = tuple_pattern (%x.patt, %.loc5_28)
  385. // CHECK:STDOUT: }
  386. // CHECK:STDOUT: %.loc5_35.1: %empty_struct_type = struct_literal ()
  387. // CHECK:STDOUT: %.loc5_40.1: %empty_struct_type = struct_literal ()
  388. // CHECK:STDOUT: %.loc5_44.1: %empty_struct_type = struct_literal ()
  389. // CHECK:STDOUT: %.loc5_45: %tuple.type.b6b = tuple_literal (%.loc5_40.1, %.loc5_44.1)
  390. // CHECK:STDOUT: %.loc5_46: %tuple.type.6ca = tuple_literal (%.loc5_35.1, %.loc5_45)
  391. // CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.3 [concrete = constants.%empty_struct_type] {
  392. // CHECK:STDOUT: %.loc5_12.2: %empty_struct_type = struct_literal ()
  393. // CHECK:STDOUT: %.loc5_12.3: type = converted %.loc5_12.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  394. // CHECK:STDOUT: }
  395. // CHECK:STDOUT: %empty_struct.loc5_35: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  396. // CHECK:STDOUT: %.loc5_35.2: %empty_struct_type = converted %.loc5_35.1, %empty_struct.loc5_35 [concrete = constants.%empty_struct]
  397. // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %.loc5_35.2
  398. // CHECK:STDOUT: %.loc5_20.1: type = splice_block %.loc5_20.3 [concrete = constants.%empty_struct_type] {
  399. // CHECK:STDOUT: %.loc5_20.2: %empty_struct_type = struct_literal ()
  400. // CHECK:STDOUT: %.loc5_20.3: type = converted %.loc5_20.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT: %empty_struct.loc5_40: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  403. // CHECK:STDOUT: %.loc5_40.2: %empty_struct_type = converted %.loc5_40.1, %empty_struct.loc5_40 [concrete = constants.%empty_struct]
  404. // CHECK:STDOUT: %y: %empty_struct_type = bind_name y, %.loc5_40.2
  405. // CHECK:STDOUT: %.loc5_27.1: type = splice_block %.loc5_27.3 [concrete = constants.%empty_struct_type] {
  406. // CHECK:STDOUT: %.loc5_27.2: %empty_struct_type = struct_literal ()
  407. // CHECK:STDOUT: %.loc5_27.3: type = converted %.loc5_27.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  408. // CHECK:STDOUT: }
  409. // CHECK:STDOUT: %empty_struct.loc5_44: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  410. // CHECK:STDOUT: %.loc5_44.2: %empty_struct_type = converted %.loc5_44.1, %empty_struct.loc5_44 [concrete = constants.%empty_struct]
  411. // CHECK:STDOUT: %z: %empty_struct_type = bind_name z, %.loc5_44.2
  412. // CHECK:STDOUT: return
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT:
  415. // CHECK:STDOUT: --- package_scope.carbon
  416. // CHECK:STDOUT:
  417. // CHECK:STDOUT: constants {
  418. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  419. // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  420. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: file {
  424. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  425. // CHECK:STDOUT: .x = %x
  426. // CHECK:STDOUT: .y = %y
  427. // CHECK:STDOUT: }
  428. // CHECK:STDOUT: name_binding_decl {
  429. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  430. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  431. // CHECK:STDOUT: %.loc4_18: %tuple.type = tuple_pattern (%x.patt, %y.patt)
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.3 [concrete = constants.%empty_struct_type] {
  434. // CHECK:STDOUT: %.loc4_10.2: %empty_struct_type = struct_literal ()
  435. // CHECK:STDOUT: %.loc4_10.3: type = converted %.loc4_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  436. // CHECK:STDOUT: }
  437. // CHECK:STDOUT: %empty_struct.loc4_24: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  438. // CHECK:STDOUT: %.loc4_24: %empty_struct_type = converted @__global_init.%.loc4_24, %empty_struct.loc4_24 [concrete = constants.%empty_struct]
  439. // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %.loc4_24
  440. // CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.3 [concrete = constants.%empty_struct_type] {
  441. // CHECK:STDOUT: %.loc4_17.2: %empty_struct_type = struct_literal ()
  442. // CHECK:STDOUT: %.loc4_17.3: type = converted %.loc4_17.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  443. // CHECK:STDOUT: }
  444. // CHECK:STDOUT: %empty_struct.loc4_28: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
  445. // CHECK:STDOUT: %.loc4_28: %empty_struct_type = converted @__global_init.%.loc4_28, %empty_struct.loc4_28 [concrete = constants.%empty_struct]
  446. // CHECK:STDOUT: %y: %empty_struct_type = bind_name y, %.loc4_28
  447. // CHECK:STDOUT: }
  448. // CHECK:STDOUT:
  449. // CHECK:STDOUT: fn @__global_init() {
  450. // CHECK:STDOUT: !entry:
  451. // CHECK:STDOUT: %.loc4_24: %empty_struct_type = struct_literal ()
  452. // CHECK:STDOUT: %.loc4_28: %empty_struct_type = struct_literal ()
  453. // CHECK:STDOUT: %.loc4_29: %tuple.type = tuple_literal (%.loc4_24, %.loc4_28)
  454. // CHECK:STDOUT: return
  455. // CHECK:STDOUT: }
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: --- fail_in_interface.carbon
  458. // CHECK:STDOUT:
  459. // CHECK:STDOUT: constants {
  460. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  461. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
  462. // CHECK:STDOUT: }
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: file {
  465. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  466. // CHECK:STDOUT: .I = %I.decl
  467. // CHECK:STDOUT: }
  468. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: interface @I {
  472. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  473. // CHECK:STDOUT:
  474. // CHECK:STDOUT: !members:
  475. // CHECK:STDOUT: .Self = %Self
  476. // CHECK:STDOUT: .x = <unexpected>.inst23.loc9_8
  477. // CHECK:STDOUT: .y = <unexpected>.inst27.loc9_15
  478. // CHECK:STDOUT: has_error
  479. // CHECK:STDOUT: witness = ()
  480. // CHECK:STDOUT: }
  481. // CHECK:STDOUT:
  482. // CHECK:STDOUT: --- fail_in_class.carbon
  483. // CHECK:STDOUT:
  484. // CHECK:STDOUT: constants {
  485. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  486. // CHECK:STDOUT: }
  487. // CHECK:STDOUT:
  488. // CHECK:STDOUT: file {}
  489. // CHECK:STDOUT:
  490. // CHECK:STDOUT: class @C {
  491. // CHECK:STDOUT: complete_type_witness = invalid
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: !members:
  494. // CHECK:STDOUT: .Self = constants.%C
  495. // CHECK:STDOUT: }
  496. // CHECK:STDOUT:
  497. // CHECK:STDOUT: --- fail_initializer_mismatch.carbon
  498. // CHECK:STDOUT:
  499. // CHECK:STDOUT: constants {
  500. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  501. // CHECK:STDOUT: %tuple.type.b6b: type = tuple_type (%empty_struct_type, %empty_struct_type) [concrete]
  502. // CHECK:STDOUT: %tuple.type.572: type = tuple_type (%empty_struct_type) [concrete]
  503. // CHECK:STDOUT: %tuple.type.8d4: type = tuple_type (%empty_struct_type, %empty_struct_type, %empty_struct_type) [concrete]
  504. // CHECK:STDOUT: }
  505. // CHECK:STDOUT:
  506. // CHECK:STDOUT: file {
  507. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  508. // CHECK:STDOUT: .x = <unexpected>.inst19.loc8_6
  509. // CHECK:STDOUT: .y = <unexpected>.inst23.loc8_13
  510. // CHECK:STDOUT: .a = <unexpected>.inst33.loc14_6
  511. // CHECK:STDOUT: .b = <unexpected>.inst37.loc14_13
  512. // CHECK:STDOUT: }
  513. // CHECK:STDOUT: name_binding_decl {
  514. // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x
  515. // CHECK:STDOUT: %y.patt: %empty_struct_type = binding_pattern y
  516. // CHECK:STDOUT: %.loc8: %tuple.type.b6b = tuple_pattern (%x.patt, %y.patt)
  517. // CHECK:STDOUT: }
  518. // CHECK:STDOUT: name_binding_decl {
  519. // CHECK:STDOUT: %a.patt: %empty_struct_type = binding_pattern a
  520. // CHECK:STDOUT: %b.patt: %empty_struct_type = binding_pattern b
  521. // CHECK:STDOUT: %.loc14: %tuple.type.b6b = tuple_pattern (%a.patt, %b.patt)
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT:
  525. // CHECK:STDOUT: fn @__global_init() {
  526. // CHECK:STDOUT: !entry:
  527. // CHECK:STDOUT: %.loc8_24: %empty_struct_type = struct_literal ()
  528. // CHECK:STDOUT: %.loc8_26: %tuple.type.572 = tuple_literal (%.loc8_24)
  529. // CHECK:STDOUT: %.loc14_24: %empty_struct_type = struct_literal ()
  530. // CHECK:STDOUT: %.loc14_28: %empty_struct_type = struct_literal ()
  531. // CHECK:STDOUT: %.loc14_32: %empty_struct_type = struct_literal ()
  532. // CHECK:STDOUT: %.loc14_33: %tuple.type.8d4 = tuple_literal (%.loc14_24, %.loc14_28, %.loc14_32)
  533. // CHECK:STDOUT: return
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT: