call_from_operator.carbon 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119
  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. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  6. // EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/builtin/call_from_operator.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/builtin/call_from_operator.carbon
  13. // --- core.carbon
  14. package Core;
  15. fn IntLiteral() -> type = "int_literal.make_type";
  16. fn Int(N: IntLiteral()) -> type = "int.make_type_signed";
  17. interface AddWith(T:! type) {
  18. fn Op[self: Self](other: Self) -> Self;
  19. }
  20. interface As(T:! type) {
  21. fn Convert[self: Self]() -> T;
  22. }
  23. interface ImplicitAs(T:! type) {
  24. fn Convert[self: Self]() -> T;
  25. }
  26. impl i32 as AddWith(i32) {
  27. fn Op[self: Self](other: Self) -> Self = "int.sadd";
  28. }
  29. impl IntLiteral() as As(i32) {
  30. fn Convert[self: Self]() -> i32 = "int.convert_checked";
  31. }
  32. impl IntLiteral() as ImplicitAs(i32) {
  33. fn Convert[self: Self]() -> i32 = "int.convert_checked";
  34. }
  35. impl i32 as ImplicitAs(IntLiteral()) {
  36. fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked";
  37. }
  38. // --- user.carbon
  39. import Core;
  40. var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
  41. // CHECK:STDOUT: --- core.carbon
  42. // CHECK:STDOUT:
  43. // CHECK:STDOUT: constants {
  44. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  45. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  46. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  47. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  48. // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
  49. // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
  50. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  51. // CHECK:STDOUT: %AddWith.type.b35: type = generic_interface_type @AddWith [concrete]
  52. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.b35 = struct_value () [concrete]
  53. // CHECK:STDOUT: %AddWith.type.bc7: type = facet_type <@AddWith, @AddWith(%T)> [symbolic]
  54. // CHECK:STDOUT: %Self.deb: %AddWith.type.bc7 = bind_symbolic_name Self, 1 [symbolic]
  55. // CHECK:STDOUT: %Self.as_type.6cc: type = facet_access_type %Self.deb [symbolic]
  56. // CHECK:STDOUT: %pattern_type.4a8: type = pattern_type %Self.as_type.6cc [symbolic]
  57. // CHECK:STDOUT: %Op.type.5b7: type = fn_type @Op.1, @AddWith(%T) [symbolic]
  58. // CHECK:STDOUT: %Op.037: %Op.type.5b7 = struct_value () [symbolic]
  59. // CHECK:STDOUT: %AddWith.assoc_type.36e: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic]
  60. // CHECK:STDOUT: %assoc0.adf: %AddWith.assoc_type.36e = assoc_entity element0, @AddWith.%Op.decl [symbolic]
  61. // CHECK:STDOUT: %As.type.b51: type = generic_interface_type @As [concrete]
  62. // CHECK:STDOUT: %As.generic: %As.type.b51 = struct_value () [concrete]
  63. // CHECK:STDOUT: %As.type.8ba: type = facet_type <@As, @As(%T)> [symbolic]
  64. // CHECK:STDOUT: %Self.b4e: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic]
  65. // CHECK:STDOUT: %Self.as_type.7f0: type = facet_access_type %Self.b4e [symbolic]
  66. // CHECK:STDOUT: %pattern_type.947: type = pattern_type %Self.as_type.7f0 [symbolic]
  67. // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
  68. // CHECK:STDOUT: %Convert.type.ad1: type = fn_type @Convert.1, @As(%T) [symbolic]
  69. // CHECK:STDOUT: %Convert.0ed: %Convert.type.ad1 = struct_value () [symbolic]
  70. // CHECK:STDOUT: %As.assoc_type.a21: type = assoc_entity_type @As, @As(%T) [symbolic]
  71. // CHECK:STDOUT: %assoc0.1d5: %As.assoc_type.a21 = assoc_entity element0, @As.%Convert.decl [symbolic]
  72. // CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete]
  73. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete]
  74. // CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
  75. // CHECK:STDOUT: %Self.0f3: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
  76. // CHECK:STDOUT: %Self.as_type.419: type = facet_access_type %Self.0f3 [symbolic]
  77. // CHECK:STDOUT: %pattern_type.a93: type = pattern_type %Self.as_type.419 [symbolic]
  78. // CHECK:STDOUT: %Convert.type.4cf: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic]
  79. // CHECK:STDOUT: %Convert.147: %Convert.type.4cf = struct_value () [symbolic]
  80. // CHECK:STDOUT: %ImplicitAs.assoc_type.095: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic]
  81. // CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type.095 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
  82. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  83. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  84. // CHECK:STDOUT: %AddWith.type.49d: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete]
  85. // CHECK:STDOUT: %Self.da9: %AddWith.type.49d = bind_symbolic_name Self, 1 [symbolic]
  86. // CHECK:STDOUT: %Op.type.efc: type = fn_type @Op.1, @AddWith(%i32.builtin) [concrete]
  87. // CHECK:STDOUT: %Op.a62: %Op.type.efc = struct_value () [concrete]
  88. // CHECK:STDOUT: %AddWith.assoc_type.a65: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete]
  89. // CHECK:STDOUT: %assoc0.ee2: %AddWith.assoc_type.a65 = assoc_entity element0, @AddWith.%Op.decl [concrete]
  90. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness file.%AddWith.impl_witness_table [concrete]
  91. // CHECK:STDOUT: %pattern_type.956: type = pattern_type %i32.builtin [concrete]
  92. // CHECK:STDOUT: %Op.type.e57: type = fn_type @Op.2 [concrete]
  93. // CHECK:STDOUT: %Op.c8a: %Op.type.e57 = struct_value () [concrete]
  94. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.49d = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete]
  95. // CHECK:STDOUT: %As.type.a09: type = facet_type <@As, @As(%i32.builtin)> [concrete]
  96. // CHECK:STDOUT: %Self.2fa: %As.type.a09 = bind_symbolic_name Self, 1 [symbolic]
  97. // CHECK:STDOUT: %Convert.type.c0d: type = fn_type @Convert.1, @As(%i32.builtin) [concrete]
  98. // CHECK:STDOUT: %Convert.713: %Convert.type.c0d = struct_value () [concrete]
  99. // CHECK:STDOUT: %As.assoc_type.b9b: type = assoc_entity_type @As, @As(%i32.builtin) [concrete]
  100. // CHECK:STDOUT: %assoc0.b02: %As.assoc_type.b9b = assoc_entity element0, @As.%Convert.decl [concrete]
  101. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness file.%As.impl_witness_table [concrete]
  102. // CHECK:STDOUT: %Convert.type.fc9: type = fn_type @Convert.3 [concrete]
  103. // CHECK:STDOUT: %Convert.33c: %Convert.type.fc9 = struct_value () [concrete]
  104. // CHECK:STDOUT: %As.facet: %As.type.a09 = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  105. // CHECK:STDOUT: %ImplicitAs.type.11a: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
  106. // CHECK:STDOUT: %Self.e0a: %ImplicitAs.type.11a = bind_symbolic_name Self, 1 [symbolic]
  107. // CHECK:STDOUT: %Convert.type.752: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [concrete]
  108. // CHECK:STDOUT: %Convert.fcc: %Convert.type.752 = struct_value () [concrete]
  109. // CHECK:STDOUT: %ImplicitAs.assoc_type.1cf: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete]
  110. // CHECK:STDOUT: %assoc0.3ce: %ImplicitAs.assoc_type.1cf = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete]
  111. // CHECK:STDOUT: %ImplicitAs.impl_witness.be0: <witness> = impl_witness file.%ImplicitAs.impl_witness_table.loc27 [concrete]
  112. // CHECK:STDOUT: %Convert.type.c2a: type = fn_type @Convert.4 [concrete]
  113. // CHECK:STDOUT: %Convert.40d: %Convert.type.c2a = struct_value () [concrete]
  114. // CHECK:STDOUT: %ImplicitAs.facet.bcb: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.be0) [concrete]
  115. // CHECK:STDOUT: %ImplicitAs.type.9fc: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  116. // CHECK:STDOUT: %Self.37e: %ImplicitAs.type.9fc = bind_symbolic_name Self, 1 [symbolic]
  117. // CHECK:STDOUT: %Convert.type.60e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete]
  118. // CHECK:STDOUT: %Convert.c73: %Convert.type.60e = struct_value () [concrete]
  119. // CHECK:STDOUT: %ImplicitAs.assoc_type.014: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete]
  120. // CHECK:STDOUT: %assoc0.757: %ImplicitAs.assoc_type.014 = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete]
  121. // CHECK:STDOUT: %ImplicitAs.impl_witness.95b: <witness> = impl_witness file.%ImplicitAs.impl_witness_table.loc31 [concrete]
  122. // CHECK:STDOUT: %Convert.type.295: type = fn_type @Convert.5 [concrete]
  123. // CHECK:STDOUT: %Convert.2bf: %Convert.type.295 = struct_value () [concrete]
  124. // CHECK:STDOUT: %ImplicitAs.facet.a85: %ImplicitAs.type.9fc = facet_value %i32.builtin, (%ImplicitAs.impl_witness.95b) [concrete]
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT:
  127. // CHECK:STDOUT: file {
  128. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  129. // CHECK:STDOUT: .IntLiteral = %IntLiteral.decl
  130. // CHECK:STDOUT: .Int = %Int.decl
  131. // CHECK:STDOUT: .AddWith = %AddWith.decl
  132. // CHECK:STDOUT: .As = %As.decl
  133. // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
  134. // CHECK:STDOUT: }
  135. // CHECK:STDOUT: %IntLiteral.decl: %IntLiteral.type = fn_decl @IntLiteral [concrete = constants.%IntLiteral] {
  136. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  137. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
  138. // CHECK:STDOUT: } {
  139. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  140. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  141. // CHECK:STDOUT: }
  142. // CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [concrete = constants.%Int] {
  143. // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = binding_pattern N [concrete]
  144. // CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern %N.patt, call_param0 [concrete]
  145. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  146. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param1 [concrete]
  147. // CHECK:STDOUT: } {
  148. // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param call_param0
  149. // CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = Core.IntLiteral] {
  150. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  151. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  152. // CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  153. // CHECK:STDOUT: %.loc5_22.3: type = converted %int_literal.make_type, %.loc5_22.2 [concrete = Core.IntLiteral]
  154. // CHECK:STDOUT: }
  155. // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param
  156. // CHECK:STDOUT: %return.param: ref type = out_param call_param1
  157. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  158. // CHECK:STDOUT: }
  159. // CHECK:STDOUT: %AddWith.decl: %AddWith.type.b35 = interface_decl @AddWith [concrete = constants.%AddWith.generic] {
  160. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  161. // CHECK:STDOUT: } {
  162. // CHECK:STDOUT: %T.loc7_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.2 (constants.%T)]
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] {
  165. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  166. // CHECK:STDOUT: } {
  167. // CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  168. // CHECK:STDOUT: }
  169. // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
  170. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  171. // CHECK:STDOUT: } {
  172. // CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.2 (constants.%T)]
  173. // CHECK:STDOUT: }
  174. // CHECK:STDOUT: impl_decl @impl.fcd [concrete] {} {
  175. // CHECK:STDOUT: %int_32.loc19_6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  176. // CHECK:STDOUT: %int.make_type_signed.loc19_6: init type = call constants.%Int(%int_32.loc19_6) [concrete = constants.%i32.builtin]
  177. // CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed.loc19_6 [concrete = constants.%i32.builtin]
  178. // CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed.loc19_6, %.loc19_6.1 [concrete = constants.%i32.builtin]
  179. // CHECK:STDOUT: %AddWith.ref: %AddWith.type.b35 = name_ref AddWith, file.%AddWith.decl [concrete = constants.%AddWith.generic]
  180. // CHECK:STDOUT: %int_32.loc19_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  181. // CHECK:STDOUT: %int.make_type_signed.loc19_21: init type = call constants.%Int(%int_32.loc19_21) [concrete = constants.%i32.builtin]
  182. // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_signed.loc19_21 [concrete = constants.%i32.builtin]
  183. // CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed.loc19_21, %.loc19_24.1 [concrete = constants.%i32.builtin]
  184. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%i32.builtin)> [concrete = constants.%AddWith.type.49d]
  185. // CHECK:STDOUT: }
  186. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (@impl.fcd.%Op.decl), @impl.fcd [concrete]
  187. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness %AddWith.impl_witness_table [concrete = constants.%AddWith.impl_witness]
  188. // CHECK:STDOUT: impl_decl @impl.028 [concrete] {} {
  189. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  190. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  191. // CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  192. // CHECK:STDOUT: %.loc23_17.2: type = converted %int_literal.make_type, %.loc23_17.1 [concrete = Core.IntLiteral]
  193. // CHECK:STDOUT: %As.ref: %As.type.b51 = name_ref As, file.%As.decl [concrete = constants.%As.generic]
  194. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  195. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  196. // CHECK:STDOUT: %.loc23_28.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  197. // CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [concrete = constants.%i32.builtin]
  198. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32.builtin)> [concrete = constants.%As.type.a09]
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (@impl.028.%Convert.decl), @impl.028 [concrete]
  201. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness %As.impl_witness_table [concrete = constants.%As.impl_witness]
  202. // CHECK:STDOUT: impl_decl @impl.e13 [concrete] {} {
  203. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  204. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  205. // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  206. // CHECK:STDOUT: %.loc27_17.2: type = converted %int_literal.make_type, %.loc27_17.1 [concrete = Core.IntLiteral]
  207. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.96f = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic]
  208. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  209. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  210. // CHECK:STDOUT: %.loc27_36.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  211. // CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [concrete = constants.%i32.builtin]
  212. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [concrete = constants.%ImplicitAs.type.11a]
  213. // CHECK:STDOUT: }
  214. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc27 = impl_witness_table (@impl.e13.%Convert.decl), @impl.e13 [concrete]
  215. // CHECK:STDOUT: %ImplicitAs.impl_witness.loc27: <witness> = impl_witness %ImplicitAs.impl_witness_table.loc27 [concrete = constants.%ImplicitAs.impl_witness.be0]
  216. // CHECK:STDOUT: impl_decl @impl.3df [concrete] {} {
  217. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  218. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  219. // CHECK:STDOUT: %.loc31_6.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  220. // CHECK:STDOUT: %.loc31_6.2: type = converted %int.make_type_signed, %.loc31_6.1 [concrete = constants.%i32.builtin]
  221. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.96f = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic]
  222. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  223. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  224. // CHECK:STDOUT: %.loc31_36.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  225. // CHECK:STDOUT: %.loc31_36.2: type = converted %int_literal.make_type, %.loc31_36.1 [concrete = Core.IntLiteral]
  226. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete = constants.%ImplicitAs.type.9fc]
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc31 = impl_witness_table (@impl.3df.%Convert.decl), @impl.3df [concrete]
  229. // CHECK:STDOUT: %ImplicitAs.impl_witness.loc31: <witness> = impl_witness %ImplicitAs.impl_witness_table.loc31 [concrete = constants.%ImplicitAs.impl_witness.95b]
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT:
  232. // CHECK:STDOUT: generic interface @AddWith(%T.loc7_19.1: type) {
  233. // CHECK:STDOUT: %T.loc7_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.2 (constants.%T)]
  234. // CHECK:STDOUT:
  235. // CHECK:STDOUT: !definition:
  236. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc7_19.2)> [symbolic = %AddWith.type (constants.%AddWith.type.bc7)]
  237. // CHECK:STDOUT: %Self.2: @AddWith.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.deb)]
  238. // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @AddWith(%T.loc7_19.2) [symbolic = %Op.type (constants.%Op.type.5b7)]
  239. // CHECK:STDOUT: %Op: @AddWith.%Op.type (%Op.type.5b7) = struct_value () [symbolic = %Op (constants.%Op.037)]
  240. // CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T.loc7_19.2) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.36e)]
  241. // CHECK:STDOUT: %assoc0.loc8_41.2: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.36e) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.adf)]
  242. // CHECK:STDOUT:
  243. // CHECK:STDOUT: interface {
  244. // CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.deb)]
  245. // CHECK:STDOUT: %Op.decl: @AddWith.%Op.type (%Op.type.5b7) = fn_decl @Op.1 [symbolic = @AddWith.%Op (constants.%Op.037)] {
  246. // CHECK:STDOUT: %self.patt: @Op.1.%pattern_type (%pattern_type.4a8) = binding_pattern self [concrete]
  247. // CHECK:STDOUT: %self.param_patt: @Op.1.%pattern_type (%pattern_type.4a8) = value_param_pattern %self.patt, call_param0 [concrete]
  248. // CHECK:STDOUT: %other.patt: @Op.1.%pattern_type (%pattern_type.4a8) = binding_pattern other [concrete]
  249. // CHECK:STDOUT: %other.param_patt: @Op.1.%pattern_type (%pattern_type.4a8) = value_param_pattern %other.patt, call_param1 [concrete]
  250. // CHECK:STDOUT: %return.patt: @Op.1.%pattern_type (%pattern_type.4a8) = return_slot_pattern [concrete]
  251. // CHECK:STDOUT: %return.param_patt: @Op.1.%pattern_type (%pattern_type.4a8) = out_param_pattern %return.patt, call_param2 [concrete]
  252. // CHECK:STDOUT: } {
  253. // CHECK:STDOUT: %.loc8_37.1: @Op.1.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)]
  254. // CHECK:STDOUT: %Self.ref.loc8_37: @Op.1.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_37.1 [symbolic = %Self (constants.%Self.deb)]
  255. // CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  256. // CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  257. // CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = value_param call_param0
  258. // CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.3 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] {
  259. // CHECK:STDOUT: %.loc8_15.2: @Op.1.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)]
  260. // CHECK:STDOUT: %Self.ref.loc8_15: @Op.1.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_15.2 [symbolic = %Self (constants.%Self.deb)]
  261. // CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  262. // CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  263. // CHECK:STDOUT: }
  264. // CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = bind_name self, %self.param
  265. // CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = value_param call_param1
  266. // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] {
  267. // CHECK:STDOUT: %.loc8_28.2: @Op.1.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)]
  268. // CHECK:STDOUT: %Self.ref.loc8_28: @Op.1.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_28.2 [symbolic = %Self (constants.%Self.deb)]
  269. // CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  270. // CHECK:STDOUT: %.loc8_28.3: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = bind_name other, %other.param
  273. // CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = out_param call_param2
  274. // CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = return_slot %return.param
  275. // CHECK:STDOUT: }
  276. // CHECK:STDOUT: %assoc0.loc8_41.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.36e) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.adf)]
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: !members:
  279. // CHECK:STDOUT: .Self = %Self.1
  280. // CHECK:STDOUT: .Op = %assoc0.loc8_41.1
  281. // CHECK:STDOUT: witness = (%Op.decl)
  282. // CHECK:STDOUT: }
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT:
  285. // CHECK:STDOUT: generic interface @As(%T.loc11_14.1: type) {
  286. // CHECK:STDOUT: %T.loc11_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  287. // CHECK:STDOUT:
  288. // CHECK:STDOUT: !definition:
  289. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc11_14.2)> [symbolic = %As.type (constants.%As.type.8ba)]
  290. // CHECK:STDOUT: %Self.2: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  291. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T.loc11_14.2) [symbolic = %Convert.type (constants.%Convert.type.ad1)]
  292. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.ad1) = struct_value () [symbolic = %Convert (constants.%Convert.0ed)]
  293. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%T.loc11_14.2) [symbolic = %As.assoc_type (constants.%As.assoc_type.a21)]
  294. // CHECK:STDOUT: %assoc0.loc12_32.2: @As.%As.assoc_type (%As.assoc_type.a21) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.1d5)]
  295. // CHECK:STDOUT:
  296. // CHECK:STDOUT: interface {
  297. // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  298. // CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.ad1) = fn_decl @Convert.1 [symbolic = @As.%Convert (constants.%Convert.0ed)] {
  299. // CHECK:STDOUT: %self.patt: @Convert.1.%pattern_type.loc12_14 (%pattern_type.947) = binding_pattern self [concrete]
  300. // CHECK:STDOUT: %self.param_patt: @Convert.1.%pattern_type.loc12_14 (%pattern_type.947) = value_param_pattern %self.patt, call_param0 [concrete]
  301. // CHECK:STDOUT: %return.patt: @Convert.1.%pattern_type.loc12_28 (%pattern_type.7dc) = return_slot_pattern [concrete]
  302. // CHECK:STDOUT: %return.param_patt: @Convert.1.%pattern_type.loc12_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete]
  303. // CHECK:STDOUT: } {
  304. // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.1 [symbolic = %T (constants.%T)]
  305. // CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.7f0) = value_param call_param0
  306. // CHECK:STDOUT: %.loc12_20.1: type = splice_block %.loc12_20.3 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)] {
  307. // CHECK:STDOUT: %.loc12_20.2: @Convert.1.%As.type (%As.type.8ba) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.b4e)]
  308. // CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.8ba) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.b4e)]
  309. // CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
  310. // CHECK:STDOUT: %.loc12_20.3: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
  311. // CHECK:STDOUT: }
  312. // CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.7f0) = bind_name self, %self.param
  313. // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param call_param1
  314. // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param
  315. // CHECK:STDOUT: }
  316. // CHECK:STDOUT: %assoc0.loc12_32.1: @As.%As.assoc_type (%As.assoc_type.a21) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.1d5)]
  317. // CHECK:STDOUT:
  318. // CHECK:STDOUT: !members:
  319. // CHECK:STDOUT: .Self = %Self.1
  320. // CHECK:STDOUT: .T = <poisoned>
  321. // CHECK:STDOUT: .Convert = %assoc0.loc12_32.1
  322. // CHECK:STDOUT: witness = (%Convert.decl)
  323. // CHECK:STDOUT: }
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT:
  326. // CHECK:STDOUT: generic interface @ImplicitAs(%T.loc15_22.1: type) {
  327. // CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.2 (constants.%T)]
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: !definition:
  330. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc15_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  331. // CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  332. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T.loc15_22.2) [symbolic = %Convert.type (constants.%Convert.type.4cf)]
  333. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.4cf) = struct_value () [symbolic = %Convert (constants.%Convert.147)]
  334. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T.loc15_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.095)]
  335. // CHECK:STDOUT: %assoc0.loc16_32.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.095) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.8f8)]
  336. // CHECK:STDOUT:
  337. // CHECK:STDOUT: interface {
  338. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  339. // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.4cf) = fn_decl @Convert.2 [symbolic = @ImplicitAs.%Convert (constants.%Convert.147)] {
  340. // CHECK:STDOUT: %self.patt: @Convert.2.%pattern_type.loc16_14 (%pattern_type.a93) = binding_pattern self [concrete]
  341. // CHECK:STDOUT: %self.param_patt: @Convert.2.%pattern_type.loc16_14 (%pattern_type.a93) = value_param_pattern %self.patt, call_param0 [concrete]
  342. // CHECK:STDOUT: %return.patt: @Convert.2.%pattern_type.loc16_28 (%pattern_type.7dc) = return_slot_pattern [concrete]
  343. // CHECK:STDOUT: %return.param_patt: @Convert.2.%pattern_type.loc16_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete]
  344. // CHECK:STDOUT: } {
  345. // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.1 [symbolic = %T (constants.%T)]
  346. // CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.419) = value_param call_param0
  347. // CHECK:STDOUT: %.loc16_20.1: type = splice_block %.loc16_20.3 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)] {
  348. // CHECK:STDOUT: %.loc16_20.2: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.0f3)]
  349. // CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.0f3)]
  350. // CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
  351. // CHECK:STDOUT: %.loc16_20.3: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
  352. // CHECK:STDOUT: }
  353. // CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.419) = bind_name self, %self.param
  354. // CHECK:STDOUT: %return.param: ref @Convert.2.%T (%T) = out_param call_param1
  355. // CHECK:STDOUT: %return: ref @Convert.2.%T (%T) = return_slot %return.param
  356. // CHECK:STDOUT: }
  357. // CHECK:STDOUT: %assoc0.loc16_32.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.095) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.8f8)]
  358. // CHECK:STDOUT:
  359. // CHECK:STDOUT: !members:
  360. // CHECK:STDOUT: .Self = %Self.1
  361. // CHECK:STDOUT: .T = <poisoned>
  362. // CHECK:STDOUT: .Convert = %assoc0.loc16_32.1
  363. // CHECK:STDOUT: witness = (%Convert.decl)
  364. // CHECK:STDOUT: }
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT:
  367. // CHECK:STDOUT: impl @impl.fcd: %.loc19_6.2 as %AddWith.type {
  368. // CHECK:STDOUT: %Op.decl: %Op.type.e57 = fn_decl @Op.2 [concrete = constants.%Op.c8a] {
  369. // CHECK:STDOUT: %self.patt: %pattern_type.956 = binding_pattern self [concrete]
  370. // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt, call_param0 [concrete]
  371. // CHECK:STDOUT: %other.patt: %pattern_type.956 = binding_pattern other [concrete]
  372. // CHECK:STDOUT: %other.param_patt: %pattern_type.956 = value_param_pattern %other.patt, call_param1 [concrete]
  373. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  374. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param2 [concrete]
  375. // CHECK:STDOUT: } {
  376. // CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.fcd.%.loc19_6.2 [concrete = constants.%i32.builtin]
  377. // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0
  378. // CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.fcd.%.loc19_6.2 [concrete = constants.%i32.builtin]
  379. // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param
  380. // CHECK:STDOUT: %other.param: %i32.builtin = value_param call_param1
  381. // CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.fcd.%.loc19_6.2 [concrete = constants.%i32.builtin]
  382. // CHECK:STDOUT: %other: %i32.builtin = bind_name other, %other.param
  383. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param2
  384. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  385. // CHECK:STDOUT: }
  386. // CHECK:STDOUT:
  387. // CHECK:STDOUT: !members:
  388. // CHECK:STDOUT: .Op = %Op.decl
  389. // CHECK:STDOUT: witness = file.%AddWith.impl_witness
  390. // CHECK:STDOUT: }
  391. // CHECK:STDOUT:
  392. // CHECK:STDOUT: impl @impl.028: %.loc23_17.2 as %As.type {
  393. // CHECK:STDOUT: %Convert.decl: %Convert.type.fc9 = fn_decl @Convert.3 [concrete = constants.%Convert.33c] {
  394. // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = binding_pattern self [concrete]
  395. // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern %self.patt, call_param0 [concrete]
  396. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  397. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param1 [concrete]
  398. // CHECK:STDOUT: } {
  399. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  400. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  401. // CHECK:STDOUT: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  402. // CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [concrete = constants.%i32.builtin]
  403. // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0
  404. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.028.%.loc23_17.2 [concrete = Core.IntLiteral]
  405. // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param
  406. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
  407. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  408. // CHECK:STDOUT: }
  409. // CHECK:STDOUT:
  410. // CHECK:STDOUT: !members:
  411. // CHECK:STDOUT: .Convert = %Convert.decl
  412. // CHECK:STDOUT: witness = file.%As.impl_witness
  413. // CHECK:STDOUT: }
  414. // CHECK:STDOUT:
  415. // CHECK:STDOUT: impl @impl.e13: %.loc27_17.2 as %ImplicitAs.type {
  416. // CHECK:STDOUT: %Convert.decl: %Convert.type.c2a = fn_decl @Convert.4 [concrete = constants.%Convert.40d] {
  417. // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = binding_pattern self [concrete]
  418. // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern %self.patt, call_param0 [concrete]
  419. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  420. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param1 [concrete]
  421. // CHECK:STDOUT: } {
  422. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  423. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  424. // CHECK:STDOUT: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  425. // CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [concrete = constants.%i32.builtin]
  426. // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0
  427. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.e13.%.loc27_17.2 [concrete = Core.IntLiteral]
  428. // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param
  429. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
  430. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  431. // CHECK:STDOUT: }
  432. // CHECK:STDOUT:
  433. // CHECK:STDOUT: !members:
  434. // CHECK:STDOUT: .Convert = %Convert.decl
  435. // CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc27
  436. // CHECK:STDOUT: }
  437. // CHECK:STDOUT:
  438. // CHECK:STDOUT: impl @impl.3df: %.loc31_6.2 as %ImplicitAs.type {
  439. // CHECK:STDOUT: %Convert.decl: %Convert.type.295 = fn_decl @Convert.5 [concrete = constants.%Convert.2bf] {
  440. // CHECK:STDOUT: %self.patt: %pattern_type.956 = binding_pattern self [concrete]
  441. // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt, call_param0 [concrete]
  442. // CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern [concrete]
  443. // CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern %return.patt, call_param1 [concrete]
  444. // CHECK:STDOUT: } {
  445. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  446. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  447. // CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  448. // CHECK:STDOUT: %.loc32_42.2: type = converted %int_literal.make_type, %.loc32_42.1 [concrete = Core.IntLiteral]
  449. // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0
  450. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3df.%.loc31_6.2 [concrete = constants.%i32.builtin]
  451. // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param
  452. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1
  453. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  454. // CHECK:STDOUT: }
  455. // CHECK:STDOUT:
  456. // CHECK:STDOUT: !members:
  457. // CHECK:STDOUT: .IntLiteral = <poisoned>
  458. // CHECK:STDOUT: .Convert = %Convert.decl
  459. // CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc31
  460. // CHECK:STDOUT: }
  461. // CHECK:STDOUT:
  462. // CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type";
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> type = "int.make_type_signed";
  465. // CHECK:STDOUT:
  466. // CHECK:STDOUT: generic fn @Op.1(@AddWith.%T.loc7_19.1: type, @AddWith.%Self.1: @AddWith.%AddWith.type (%AddWith.type.bc7)) {
  467. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  468. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.bc7)]
  469. // CHECK:STDOUT: %Self: @Op.1.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.deb)]
  470. // CHECK:STDOUT: %Self.as_type.loc8_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  471. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc8_15.1 [symbolic = %pattern_type (constants.%pattern_type.4a8)]
  472. // CHECK:STDOUT:
  473. // CHECK:STDOUT: fn(%self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc), %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc)) -> @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.6cc);
  474. // CHECK:STDOUT: }
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: generic fn @Convert.1(@As.%T.loc11_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) {
  477. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  478. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.8ba)]
  479. // CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)]
  480. // CHECK:STDOUT: %Self.as_type.loc12_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
  481. // CHECK:STDOUT: %pattern_type.loc12_14: type = pattern_type %Self.as_type.loc12_20.1 [symbolic = %pattern_type.loc12_14 (constants.%pattern_type.947)]
  482. // CHECK:STDOUT: %pattern_type.loc12_28: type = pattern_type %T [symbolic = %pattern_type.loc12_28 (constants.%pattern_type.7dc)]
  483. // CHECK:STDOUT:
  484. // CHECK:STDOUT: fn(%self.param: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.7f0)) -> @Convert.1.%T (%T);
  485. // CHECK:STDOUT: }
  486. // CHECK:STDOUT:
  487. // CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%T.loc15_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
  488. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  489. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  490. // CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)]
  491. // CHECK:STDOUT: %Self.as_type.loc16_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
  492. // CHECK:STDOUT: %pattern_type.loc16_14: type = pattern_type %Self.as_type.loc16_20.1 [symbolic = %pattern_type.loc16_14 (constants.%pattern_type.a93)]
  493. // CHECK:STDOUT: %pattern_type.loc16_28: type = pattern_type %T [symbolic = %pattern_type.loc16_28 (constants.%pattern_type.7dc)]
  494. // CHECK:STDOUT:
  495. // CHECK:STDOUT: fn(%self.param: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.419)) -> @Convert.2.%T (%T);
  496. // CHECK:STDOUT: }
  497. // CHECK:STDOUT:
  498. // CHECK:STDOUT: fn @Op.2(%self.param: %i32.builtin, %other.param: %i32.builtin) -> %i32.builtin = "int.sadd";
  499. // CHECK:STDOUT:
  500. // CHECK:STDOUT: fn @Convert.3(%self.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
  501. // CHECK:STDOUT:
  502. // CHECK:STDOUT: fn @Convert.4(%self.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
  503. // CHECK:STDOUT:
  504. // CHECK:STDOUT: fn @Convert.5(%self.param: %i32.builtin) -> Core.IntLiteral = "int.convert_checked";
  505. // CHECK:STDOUT:
  506. // CHECK:STDOUT: specific @AddWith(constants.%T) {
  507. // CHECK:STDOUT: %T.loc7_19.2 => constants.%T
  508. // CHECK:STDOUT: }
  509. // CHECK:STDOUT:
  510. // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.deb) {
  511. // CHECK:STDOUT: %T => constants.%T
  512. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.bc7
  513. // CHECK:STDOUT: %Self => constants.%Self.deb
  514. // CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%Self.as_type.6cc
  515. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4a8
  516. // CHECK:STDOUT: }
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: specific @As(constants.%T) {
  519. // CHECK:STDOUT: %T.loc11_14.2 => constants.%T
  520. // CHECK:STDOUT: }
  521. // CHECK:STDOUT:
  522. // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.b4e) {
  523. // CHECK:STDOUT: %T => constants.%T
  524. // CHECK:STDOUT: %As.type => constants.%As.type.8ba
  525. // CHECK:STDOUT: %Self => constants.%Self.b4e
  526. // CHECK:STDOUT: %Self.as_type.loc12_20.1 => constants.%Self.as_type.7f0
  527. // CHECK:STDOUT: %pattern_type.loc12_14 => constants.%pattern_type.947
  528. // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.7dc
  529. // CHECK:STDOUT: }
  530. // CHECK:STDOUT:
  531. // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
  532. // CHECK:STDOUT: %T.loc15_22.2 => constants.%T
  533. // CHECK:STDOUT: }
  534. // CHECK:STDOUT:
  535. // CHECK:STDOUT: specific @Convert.2(constants.%T, constants.%Self.0f3) {
  536. // CHECK:STDOUT: %T => constants.%T
  537. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
  538. // CHECK:STDOUT: %Self => constants.%Self.0f3
  539. // CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%Self.as_type.419
  540. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.a93
  541. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.7dc
  542. // CHECK:STDOUT: }
  543. // CHECK:STDOUT:
  544. // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) {
  545. // CHECK:STDOUT: %T.loc7_19.2 => constants.%i32.builtin
  546. // CHECK:STDOUT:
  547. // CHECK:STDOUT: !definition:
  548. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.49d
  549. // CHECK:STDOUT: %Self.2 => constants.%Self.da9
  550. // CHECK:STDOUT: %Op.type => constants.%Op.type.efc
  551. // CHECK:STDOUT: %Op => constants.%Op.a62
  552. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.a65
  553. // CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.ee2
  554. // CHECK:STDOUT: }
  555. // CHECK:STDOUT:
  556. // CHECK:STDOUT: specific @Op.1(constants.%i32.builtin, constants.%AddWith.facet) {
  557. // CHECK:STDOUT: %T => constants.%i32.builtin
  558. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.49d
  559. // CHECK:STDOUT: %Self => constants.%AddWith.facet
  560. // CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32.builtin
  561. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.956
  562. // CHECK:STDOUT: }
  563. // CHECK:STDOUT:
  564. // CHECK:STDOUT: specific @As(constants.%i32.builtin) {
  565. // CHECK:STDOUT: %T.loc11_14.2 => constants.%i32.builtin
  566. // CHECK:STDOUT:
  567. // CHECK:STDOUT: !definition:
  568. // CHECK:STDOUT: %As.type => constants.%As.type.a09
  569. // CHECK:STDOUT: %Self.2 => constants.%Self.2fa
  570. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.c0d
  571. // CHECK:STDOUT: %Convert => constants.%Convert.713
  572. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.b9b
  573. // CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.b02
  574. // CHECK:STDOUT: }
  575. // CHECK:STDOUT:
  576. // CHECK:STDOUT: specific @Convert.1(constants.%i32.builtin, constants.%As.facet) {
  577. // CHECK:STDOUT: %T => constants.%i32.builtin
  578. // CHECK:STDOUT: %As.type => constants.%As.type.a09
  579. // CHECK:STDOUT: %Self => constants.%As.facet
  580. // CHECK:STDOUT: %Self.as_type.loc12_20.1 => Core.IntLiteral
  581. // CHECK:STDOUT: %pattern_type.loc12_14 => constants.%pattern_type.dc0
  582. // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.956
  583. // CHECK:STDOUT: }
  584. // CHECK:STDOUT:
  585. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) {
  586. // CHECK:STDOUT: %T.loc15_22.2 => constants.%i32.builtin
  587. // CHECK:STDOUT:
  588. // CHECK:STDOUT: !definition:
  589. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.11a
  590. // CHECK:STDOUT: %Self.2 => constants.%Self.e0a
  591. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.752
  592. // CHECK:STDOUT: %Convert => constants.%Convert.fcc
  593. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.1cf
  594. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.3ce
  595. // CHECK:STDOUT: }
  596. // CHECK:STDOUT:
  597. // CHECK:STDOUT: specific @Convert.2(constants.%i32.builtin, constants.%ImplicitAs.facet.bcb) {
  598. // CHECK:STDOUT: %T => constants.%i32.builtin
  599. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.11a
  600. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.bcb
  601. // CHECK:STDOUT: %Self.as_type.loc16_20.1 => Core.IntLiteral
  602. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.dc0
  603. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.956
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT:
  606. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  607. // CHECK:STDOUT: %T.loc15_22.2 => Core.IntLiteral
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: !definition:
  610. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fc
  611. // CHECK:STDOUT: %Self.2 => constants.%Self.37e
  612. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.60e
  613. // CHECK:STDOUT: %Convert => constants.%Convert.c73
  614. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.014
  615. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.757
  616. // CHECK:STDOUT: }
  617. // CHECK:STDOUT:
  618. // CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%ImplicitAs.facet.a85) {
  619. // CHECK:STDOUT: %T => Core.IntLiteral
  620. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fc
  621. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.a85
  622. // CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%i32.builtin
  623. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.956
  624. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.dc0
  625. // CHECK:STDOUT: }
  626. // CHECK:STDOUT:
  627. // CHECK:STDOUT: --- user.carbon
  628. // CHECK:STDOUT:
  629. // CHECK:STDOUT: constants {
  630. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  631. // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
  632. // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
  633. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  634. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  635. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  636. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  637. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  638. // CHECK:STDOUT: %As.type.eed: type = facet_type <@As, @As(%T)> [symbolic]
  639. // CHECK:STDOUT: %Self.65a: %As.type.eed = bind_symbolic_name Self, 1 [symbolic]
  640. // CHECK:STDOUT: %Convert.type.843: type = fn_type @Convert.1, @As(%T) [symbolic]
  641. // CHECK:STDOUT: %Convert.95f: %Convert.type.843 = struct_value () [symbolic]
  642. // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
  643. // CHECK:STDOUT: %Self.as_type.04d: type = facet_access_type %Self.65a [symbolic]
  644. // CHECK:STDOUT: %pattern_type.ca4: type = pattern_type %Self.as_type.04d [symbolic]
  645. // CHECK:STDOUT: %As.assoc_type.760: type = assoc_entity_type @As, @As(%T) [symbolic]
  646. // CHECK:STDOUT: %assoc0.076: %As.assoc_type.760 = assoc_entity element0, imports.%Core.import_ref.708 [symbolic]
  647. // CHECK:STDOUT: %As.type.a6d: type = facet_type <@As, @As(%i32.builtin)> [concrete]
  648. // CHECK:STDOUT: %Self.c25: %As.type.a6d = bind_symbolic_name Self, 1 [symbolic]
  649. // CHECK:STDOUT: %Convert.type.378: type = fn_type @Convert.1, @As(%i32.builtin) [concrete]
  650. // CHECK:STDOUT: %Convert.e51: %Convert.type.378 = struct_value () [concrete]
  651. // CHECK:STDOUT: %As.assoc_type.bc2: type = assoc_entity_type @As, @As(%i32.builtin) [concrete]
  652. // CHECK:STDOUT: %assoc0.9fb: %As.assoc_type.bc2 = assoc_entity element0, imports.%Core.import_ref.708 [concrete]
  653. // CHECK:STDOUT: %assoc0.97d: %As.assoc_type.760 = assoc_entity element0, imports.%Core.import_ref.4e8 [symbolic]
  654. // CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete]
  655. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete]
  656. // CHECK:STDOUT: %AddWith.type.6d3: type = facet_type <@AddWith, @AddWith(%T)> [symbolic]
  657. // CHECK:STDOUT: %Self.6c1: %AddWith.type.6d3 = bind_symbolic_name Self, 1 [symbolic]
  658. // CHECK:STDOUT: %AddWith.type.6f5: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete]
  659. // CHECK:STDOUT: %Op.type.22d: type = fn_type @Op.1, @AddWith(%T) [symbolic]
  660. // CHECK:STDOUT: %Op.965: %Op.type.22d = struct_value () [symbolic]
  661. // CHECK:STDOUT: %Self.as_type.030: type = facet_access_type %Self.6c1 [symbolic]
  662. // CHECK:STDOUT: %pattern_type.7fc: type = pattern_type %Self.as_type.030 [symbolic]
  663. // CHECK:STDOUT: %AddWith.assoc_type.c10: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic]
  664. // CHECK:STDOUT: %assoc0.89962d.1: %AddWith.assoc_type.c10 = assoc_entity element0, imports.%Core.import_ref.7e6ace.1 [symbolic]
  665. // CHECK:STDOUT: %Self.ec3: %AddWith.type.6f5 = bind_symbolic_name Self, 1 [symbolic]
  666. // CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.1, @AddWith(%i32.builtin) [concrete]
  667. // CHECK:STDOUT: %Op.9d6: %Op.type.0b7 = struct_value () [concrete]
  668. // CHECK:STDOUT: %AddWith.assoc_type.dff: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete]
  669. // CHECK:STDOUT: %assoc0.7f1: %AddWith.assoc_type.dff = assoc_entity element0, imports.%Core.import_ref.1b9 [concrete]
  670. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  671. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  672. // CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
  673. // CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
  674. // CHECK:STDOUT: %ImplicitAs.type.61e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
  675. // CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic]
  676. // CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
  677. // CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
  678. // CHECK:STDOUT: %pattern_type.f3e: type = pattern_type %Self.as_type.40a [symbolic]
  679. // CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic]
  680. // CHECK:STDOUT: %assoc0.dc001e.1: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
  681. // CHECK:STDOUT: %Self.d28: %ImplicitAs.type.61e = bind_symbolic_name Self, 1 [symbolic]
  682. // CHECK:STDOUT: %Convert.type.059: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [concrete]
  683. // CHECK:STDOUT: %Convert.4d7: %Convert.type.059 = struct_value () [concrete]
  684. // CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete]
  685. // CHECK:STDOUT: %assoc0.6fd: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.1c752f.1 [concrete]
  686. // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  687. // CHECK:STDOUT: %Self.9ac: %ImplicitAs.type.2fd = bind_symbolic_name Self, 1 [symbolic]
  688. // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete]
  689. // CHECK:STDOUT: %Convert.0e2: %Convert.type.71e = struct_value () [concrete]
  690. // CHECK:STDOUT: %ImplicitAs.assoc_type.959: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete]
  691. // CHECK:STDOUT: %assoc0.8c4: %ImplicitAs.assoc_type.959 = assoc_entity element0, imports.%Core.import_ref.1c752f.2 [concrete]
  692. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
  693. // CHECK:STDOUT: %As.facet: %As.type.a6d = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  694. // CHECK:STDOUT: %.387: type = fn_type_with_self_type %Convert.type.378, %As.facet [concrete]
  695. // CHECK:STDOUT: %Convert.type.953: type = fn_type @Convert.3 [concrete]
  696. // CHECK:STDOUT: %Convert.5bc: %Convert.type.953 = struct_value () [concrete]
  697. // CHECK:STDOUT: %Convert.bound.b34: <bound method> = bound_method %int_1.5b8, %Convert.5bc [concrete]
  698. // CHECK:STDOUT: %int_1.f38: %i32.builtin = int_value 1 [concrete]
  699. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  700. // CHECK:STDOUT: %Convert.bound.324: <bound method> = bound_method %int_2.ecc, %Convert.5bc [concrete]
  701. // CHECK:STDOUT: %int_2.5a1: %i32.builtin = int_value 2 [concrete]
  702. // CHECK:STDOUT: %assoc0.89962d.2: %AddWith.assoc_type.c10 = assoc_entity element0, imports.%Core.import_ref.7e6ace.2 [symbolic]
  703. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness imports.%AddWith.impl_witness_table [concrete]
  704. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.6f5 = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete]
  705. // CHECK:STDOUT: %.1e7: type = fn_type_with_self_type %Op.type.0b7, %AddWith.facet [concrete]
  706. // CHECK:STDOUT: %Op.type.2bc: type = fn_type @Op.2 [concrete]
  707. // CHECK:STDOUT: %Op.9d1: %Op.type.2bc = struct_value () [concrete]
  708. // CHECK:STDOUT: %Op.bound.de8: <bound method> = bound_method %int_1.f38, %Op.9d1 [concrete]
  709. // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete]
  710. // CHECK:STDOUT: %assoc0.dc001e.2: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
  711. // CHECK:STDOUT: %ImplicitAs.impl_witness.9c5: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.5fc [concrete]
  712. // CHECK:STDOUT: %ImplicitAs.facet.07b: %ImplicitAs.type.2fd = facet_value %i32.builtin, (%ImplicitAs.impl_witness.9c5) [concrete]
  713. // CHECK:STDOUT: %.53b: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.07b [concrete]
  714. // CHECK:STDOUT: %Convert.type.0e4: type = fn_type @Convert.4 [concrete]
  715. // CHECK:STDOUT: %Convert.b32: %Convert.type.0e4 = struct_value () [concrete]
  716. // CHECK:STDOUT: %Convert.bound.65a: <bound method> = bound_method %int_3.a0f, %Convert.b32 [concrete]
  717. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  718. // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32.builtin [concrete]
  719. // CHECK:STDOUT: %pattern_type.9e2: type = pattern_type %array_type [concrete]
  720. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  721. // CHECK:STDOUT: %Convert.bound.94d: <bound method> = bound_method %int_3.1ba, %Convert.5bc [concrete]
  722. // CHECK:STDOUT: %Convert.bound.8fc: <bound method> = bound_method %int_4.0c1, %Convert.5bc [concrete]
  723. // CHECK:STDOUT: %int_4.4f1: %i32.builtin = int_value 4 [concrete]
  724. // CHECK:STDOUT: %Op.bound.703: <bound method> = bound_method %int_3.a0f, %Op.9d1 [concrete]
  725. // CHECK:STDOUT: %int_7: %i32.builtin = int_value 7 [concrete]
  726. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [concrete]
  727. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  728. // CHECK:STDOUT: %ImplicitAs.impl_witness.07a: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.78e [concrete]
  729. // CHECK:STDOUT: %ImplicitAs.facet.a3d: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.07a) [concrete]
  730. // CHECK:STDOUT: %.ec1: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.a3d [concrete]
  731. // CHECK:STDOUT: %Convert.type.49f: type = fn_type @Convert.5 [concrete]
  732. // CHECK:STDOUT: %Convert.cb5: %Convert.type.49f = struct_value () [concrete]
  733. // CHECK:STDOUT: %Convert.bound.b6b: <bound method> = bound_method %int_3.1ba, %Convert.cb5 [concrete]
  734. // CHECK:STDOUT: %Convert.bound.626: <bound method> = bound_method %int_4.0c1, %Convert.cb5 [concrete]
  735. // CHECK:STDOUT: %array: %array_type = tuple_value (%int_3.a0f, %int_4.4f1, %int_7) [concrete]
  736. // CHECK:STDOUT: }
  737. // CHECK:STDOUT:
  738. // CHECK:STDOUT: imports {
  739. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  740. // CHECK:STDOUT: .Int = %Core.Int
  741. // CHECK:STDOUT: .As = %Core.As
  742. // CHECK:STDOUT: .AddWith = %Core.AddWith
  743. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  744. // CHECK:STDOUT: import Core//default
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int]
  747. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic]
  748. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
  749. // CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst103 [no loc], unloaded
  750. // CHECK:STDOUT: %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)]
  751. // CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded
  752. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
  753. // CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst103 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)]
  754. // CHECK:STDOUT: %Core.import_ref.708: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%Convert (constants.%Convert.95f)]
  755. // CHECK:STDOUT: %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded
  756. // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)]
  757. // CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst49 [no loc], unloaded
  758. // CHECK:STDOUT: %Core.import_ref.35d: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.89962d.2)]
  759. // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded
  760. // CHECK:STDOUT: %Core.import_ref.772: <witness> = import_ref Core//default, loc19_26, loaded [concrete = constants.%AddWith.impl_witness]
  761. // CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin]
  762. // CHECK:STDOUT: %Core.import_ref.ef3: type = import_ref Core//default, loc19_24, loaded [concrete = constants.%AddWith.type.6f5]
  763. // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)]
  764. // CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst49 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)]
  765. // CHECK:STDOUT: %Core.import_ref.7e6ace.1 = import_ref Core//default, loc8_41, unloaded
  766. // CHECK:STDOUT: %Core.import_ref.1b9: @AddWith.%Op.type (%Op.type.22d) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%Op (constants.%Op.965)]
  767. // CHECK:STDOUT: %Core.import_ref.cb6: <witness> = import_ref Core//default, loc23_30, loaded [concrete = constants.%As.impl_witness]
  768. // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral]
  769. // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d]
  770. // CHECK:STDOUT: %Core.import_ref.5ab3ec.5: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
  771. // CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst147 [no loc], unloaded
  772. // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)]
  773. // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded
  774. // CHECK:STDOUT: %Core.import_ref.c62: <witness> = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a]
  775. // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral]
  776. // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e]
  777. // CHECK:STDOUT: %Core.import_ref.5ab3ec.6: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
  778. // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst147 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
  779. // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded
  780. // CHECK:STDOUT: %Core.import_ref.1c752f.1: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  781. // CHECK:STDOUT: %Core.import_ref.c5f: <witness> = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5]
  782. // CHECK:STDOUT: %Core.import_ref.c8c7cd.2: type = import_ref Core//default, loc31_6, loaded [concrete = constants.%i32.builtin]
  783. // CHECK:STDOUT: %Core.import_ref.efb: type = import_ref Core//default, loc31_36, loaded [concrete = constants.%ImplicitAs.type.2fd]
  784. // CHECK:STDOUT: %Core.import_ref.1c752f.2: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  785. // CHECK:STDOUT: %Core.import_ref.73a: %Convert.type.953 = import_ref Core//default, loc24_35, loaded [concrete = constants.%Convert.5bc]
  786. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.73a), @impl.2cc [concrete]
  787. // CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//default, AddWith, loaded [concrete = constants.%AddWith.generic]
  788. // CHECK:STDOUT: %Core.import_ref.7e6ace.2 = import_ref Core//default, loc8_41, unloaded
  789. // CHECK:STDOUT: %Core.import_ref.079: %Op.type.2bc = import_ref Core//default, loc20_42, loaded [concrete = constants.%Op.9d1]
  790. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.079), @impl.23c [concrete]
  791. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  792. // CHECK:STDOUT: %Core.import_ref.207961.2 = import_ref Core//default, loc16_32, unloaded
  793. // CHECK:STDOUT: %Core.import_ref.4f9: %Convert.type.0e4 = import_ref Core//default, loc32_44, loaded [concrete = constants.%Convert.b32]
  794. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.5fc = impl_witness_table (%Core.import_ref.4f9), @impl.ddc [concrete]
  795. // CHECK:STDOUT: %Core.import_ref.f35: %Convert.type.49f = import_ref Core//default, loc28_35, loaded [concrete = constants.%Convert.cb5]
  796. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.78e = impl_witness_table (%Core.import_ref.f35), @impl.68b [concrete]
  797. // CHECK:STDOUT: }
  798. // CHECK:STDOUT:
  799. // CHECK:STDOUT: file {
  800. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  801. // CHECK:STDOUT: .Core = imports.%Core
  802. // CHECK:STDOUT: .arr = %arr
  803. // CHECK:STDOUT: }
  804. // CHECK:STDOUT: %Core.import = import Core
  805. // CHECK:STDOUT: name_binding_decl {
  806. // CHECK:STDOUT: %arr.patt: %pattern_type.9e2 = binding_pattern arr [concrete]
  807. // CHECK:STDOUT: %arr.var_patt: %pattern_type.9e2 = var_pattern %arr.patt [concrete]
  808. // CHECK:STDOUT: }
  809. // CHECK:STDOUT: %arr.var: ref %array_type = var %arr.var_patt [concrete]
  810. // CHECK:STDOUT: %.loc4_44: type = splice_block %array_type [concrete = constants.%array_type] {
  811. // CHECK:STDOUT: %int_32.loc4_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  812. // CHECK:STDOUT: %int.make_type_signed.loc4_16: init type = call constants.%Int(%int_32.loc4_16) [concrete = constants.%i32.builtin]
  813. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  814. // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  815. // CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [concrete = constants.%i32.builtin]
  816. // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [concrete = constants.%i32.builtin]
  817. // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [concrete = constants.%i32.builtin]
  818. // CHECK:STDOUT: %impl.elem0.loc4_24: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  819. // CHECK:STDOUT: %bound_method.loc4_24: <bound method> = bound_method %int_1, %impl.elem0.loc4_24 [concrete = constants.%Convert.bound.b34]
  820. // CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32.builtin = call %bound_method.loc4_24(%int_1) [concrete = constants.%int_1.f38]
  821. // CHECK:STDOUT: %.loc4_24.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_24 [concrete = constants.%int_1.f38]
  822. // CHECK:STDOUT: %.loc4_24.2: %i32.builtin = converted %int_1, %.loc4_24.1 [concrete = constants.%int_1.f38]
  823. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  824. // CHECK:STDOUT: %int_32.loc4_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  825. // CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%int_32.loc4_40) [concrete = constants.%i32.builtin]
  826. // CHECK:STDOUT: %.loc4_40.1: type = value_of_initializer %int.make_type_signed.loc4_40 [concrete = constants.%i32.builtin]
  827. // CHECK:STDOUT: %.loc4_40.2: type = converted %int.make_type_signed.loc4_40, %.loc4_40.1 [concrete = constants.%i32.builtin]
  828. // CHECK:STDOUT: %impl.elem0.loc4_37: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  829. // CHECK:STDOUT: %bound_method.loc4_37: <bound method> = bound_method %int_2, %impl.elem0.loc4_37 [concrete = constants.%Convert.bound.324]
  830. // CHECK:STDOUT: %int.convert_checked.loc4_37: init %i32.builtin = call %bound_method.loc4_37(%int_2) [concrete = constants.%int_2.5a1]
  831. // CHECK:STDOUT: %.loc4_37.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_37 [concrete = constants.%int_2.5a1]
  832. // CHECK:STDOUT: %.loc4_37.2: %i32.builtin = converted %int_2, %.loc4_37.1 [concrete = constants.%int_2.5a1]
  833. // CHECK:STDOUT: %impl.elem0.loc4_32.1: %.1e7 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%Op.9d1]
  834. // CHECK:STDOUT: %bound_method.loc4_32.1: <bound method> = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%Op.bound.de8]
  835. // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_32.1(%.loc4_24.2, %.loc4_37.2) [concrete = constants.%int_3.a0f]
  836. // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_signed.loc4_16 [concrete = constants.%i32.builtin]
  837. // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_signed.loc4_16, %.loc4_16.1 [concrete = constants.%i32.builtin]
  838. // CHECK:STDOUT: %impl.elem0.loc4_32.2: %.53b = impl_witness_access constants.%ImplicitAs.impl_witness.9c5, element0 [concrete = constants.%Convert.b32]
  839. // CHECK:STDOUT: %bound_method.loc4_32.2: <bound method> = bound_method %int.sadd, %impl.elem0.loc4_32.2 [concrete = constants.%Convert.bound.65a]
  840. // CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %int.sadd [concrete = constants.%int_3.a0f]
  841. // CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %int.sadd, %.loc4_32.1 [concrete = constants.%int_3.a0f]
  842. // CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %bound_method.loc4_32.2(%.loc4_32.2) [concrete = constants.%int_3.1ba]
  843. // CHECK:STDOUT: %.loc4_32.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_32 [concrete = constants.%int_3.1ba]
  844. // CHECK:STDOUT: %.loc4_32.4: Core.IntLiteral = converted %int.sadd, %.loc4_32.3 [concrete = constants.%int_3.1ba]
  845. // CHECK:STDOUT: %array_type: type = array_type %.loc4_32.4, %.loc4_16.2 [concrete = constants.%array_type]
  846. // CHECK:STDOUT: }
  847. // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var [concrete = %arr.var]
  848. // CHECK:STDOUT: }
  849. // CHECK:STDOUT:
  850. // CHECK:STDOUT: generic interface @As(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] {
  851. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  852. // CHECK:STDOUT:
  853. // CHECK:STDOUT: !definition:
  854. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.eed)]
  855. // CHECK:STDOUT: %Self: @As.%As.type (%As.type.eed) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
  856. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T) [symbolic = %Convert.type (constants.%Convert.type.843)]
  857. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.843) = struct_value () [symbolic = %Convert (constants.%Convert.95f)]
  858. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%T) [symbolic = %As.assoc_type (constants.%As.assoc_type.760)]
  859. // CHECK:STDOUT: %assoc0: @As.%As.assoc_type (%As.assoc_type.760) = assoc_entity element0, imports.%Core.import_ref.708 [symbolic = %assoc0 (constants.%assoc0.076)]
  860. // CHECK:STDOUT:
  861. // CHECK:STDOUT: interface {
  862. // CHECK:STDOUT: !members:
  863. // CHECK:STDOUT: .Self = imports.%Core.import_ref.a7c
  864. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.5e1
  865. // CHECK:STDOUT: witness = (imports.%Core.Convert.313)
  866. // CHECK:STDOUT: }
  867. // CHECK:STDOUT: }
  868. // CHECK:STDOUT:
  869. // CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.5ab3ec.3: type) [from "core.carbon"] {
  870. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  871. // CHECK:STDOUT:
  872. // CHECK:STDOUT: !definition:
  873. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d3)]
  874. // CHECK:STDOUT: %Self: @AddWith.%AddWith.type (%AddWith.type.6d3) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.6c1)]
  875. // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @AddWith(%T) [symbolic = %Op.type (constants.%Op.type.22d)]
  876. // CHECK:STDOUT: %Op: @AddWith.%Op.type (%Op.type.22d) = struct_value () [symbolic = %Op (constants.%Op.965)]
  877. // CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.c10)]
  878. // CHECK:STDOUT: %assoc0: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = assoc_entity element0, imports.%Core.import_ref.7e6ace.1 [symbolic = %assoc0 (constants.%assoc0.89962d.1)]
  879. // CHECK:STDOUT:
  880. // CHECK:STDOUT: interface {
  881. // CHECK:STDOUT: !members:
  882. // CHECK:STDOUT: .Self = imports.%Core.import_ref.476
  883. // CHECK:STDOUT: .Op = imports.%Core.import_ref.35d
  884. // CHECK:STDOUT: witness = (imports.%Core.Op)
  885. // CHECK:STDOUT: }
  886. // CHECK:STDOUT: }
  887. // CHECK:STDOUT:
  888. // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.5: type) [from "core.carbon"] {
  889. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  890. // CHECK:STDOUT:
  891. // CHECK:STDOUT: !definition:
  892. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  893. // CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  894. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.275)]
  895. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
  896. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ca0)]
  897. // CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.dc001e.1)]
  898. // CHECK:STDOUT:
  899. // CHECK:STDOUT: interface {
  900. // CHECK:STDOUT: !members:
  901. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
  902. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.492
  903. // CHECK:STDOUT: witness = (imports.%Core.Convert.e69)
  904. // CHECK:STDOUT: }
  905. // CHECK:STDOUT: }
  906. // CHECK:STDOUT:
  907. // CHECK:STDOUT: impl @impl.23c: imports.%Core.import_ref.c8c7cd.1 as imports.%Core.import_ref.ef3 [from "core.carbon"] {
  908. // CHECK:STDOUT: !members:
  909. // CHECK:STDOUT: witness = imports.%Core.import_ref.772
  910. // CHECK:STDOUT: }
  911. // CHECK:STDOUT:
  912. // CHECK:STDOUT: impl @impl.2cc: imports.%Core.import_ref.8721d7.1 as imports.%Core.import_ref.1e5 [from "core.carbon"] {
  913. // CHECK:STDOUT: !members:
  914. // CHECK:STDOUT: witness = imports.%Core.import_ref.cb6
  915. // CHECK:STDOUT: }
  916. // CHECK:STDOUT:
  917. // CHECK:STDOUT: impl @impl.68b: imports.%Core.import_ref.8721d7.2 as imports.%Core.import_ref.4d9 [from "core.carbon"] {
  918. // CHECK:STDOUT: !members:
  919. // CHECK:STDOUT: witness = imports.%Core.import_ref.c62
  920. // CHECK:STDOUT: }
  921. // CHECK:STDOUT:
  922. // CHECK:STDOUT: impl @impl.ddc: imports.%Core.import_ref.c8c7cd.2 as imports.%Core.import_ref.efb [from "core.carbon"] {
  923. // CHECK:STDOUT: !members:
  924. // CHECK:STDOUT: witness = imports.%Core.import_ref.c5f
  925. // CHECK:STDOUT: }
  926. // CHECK:STDOUT:
  927. // CHECK:STDOUT: fn @Int = "int.make_type_signed" [from "core.carbon"];
  928. // CHECK:STDOUT:
  929. // CHECK:STDOUT: generic fn @Convert.1(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.996: @As.%As.type (%As.type.eed)) [from "core.carbon"] {
  930. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  931. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.eed)]
  932. // CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.eed) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
  933. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.04d)]
  934. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.ca4)]
  935. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)]
  936. // CHECK:STDOUT:
  937. // CHECK:STDOUT: fn;
  938. // CHECK:STDOUT: }
  939. // CHECK:STDOUT:
  940. // CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.5ab3ec.4: type, imports.%Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3)) [from "core.carbon"] {
  941. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  942. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d3)]
  943. // CHECK:STDOUT: %Self: @Op.1.%AddWith.type (%AddWith.type.6d3) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.6c1)]
  944. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.030)]
  945. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.7fc)]
  946. // CHECK:STDOUT:
  947. // CHECK:STDOUT: fn;
  948. // CHECK:STDOUT: }
  949. // CHECK:STDOUT:
  950. // CHECK:STDOUT: generic fn @Convert.2(imports.%Core.import_ref.5ab3ec.6: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] {
  951. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  952. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  953. // CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  954. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.40a)]
  955. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.f3e)]
  956. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)]
  957. // CHECK:STDOUT:
  958. // CHECK:STDOUT: fn;
  959. // CHECK:STDOUT: }
  960. // CHECK:STDOUT:
  961. // CHECK:STDOUT: fn @Convert.3 = "int.convert_checked" [from "core.carbon"];
  962. // CHECK:STDOUT:
  963. // CHECK:STDOUT: fn @Op.2 = "int.sadd" [from "core.carbon"];
  964. // CHECK:STDOUT:
  965. // CHECK:STDOUT: fn @Convert.4 = "int.convert_checked" [from "core.carbon"];
  966. // CHECK:STDOUT:
  967. // CHECK:STDOUT: fn @Convert.5 = "int.convert_checked" [from "core.carbon"];
  968. // CHECK:STDOUT:
  969. // CHECK:STDOUT: fn @__global_init() {
  970. // CHECK:STDOUT: !entry:
  971. // CHECK:STDOUT: %int_3.loc4_49: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  972. // CHECK:STDOUT: %int_4.loc4_52: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  973. // CHECK:STDOUT: %int_3.loc4_56: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  974. // CHECK:STDOUT: %int_32.loc4_61: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  975. // CHECK:STDOUT: %int.make_type_signed.loc4_61: init type = call constants.%Int(%int_32.loc4_61) [concrete = constants.%i32.builtin]
  976. // CHECK:STDOUT: %.loc4_61.1: type = value_of_initializer %int.make_type_signed.loc4_61 [concrete = constants.%i32.builtin]
  977. // CHECK:STDOUT: %.loc4_61.2: type = converted %int.make_type_signed.loc4_61, %.loc4_61.1 [concrete = constants.%i32.builtin]
  978. // CHECK:STDOUT: %impl.elem0.loc4_58: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  979. // CHECK:STDOUT: %bound_method.loc4_58: <bound method> = bound_method %int_3.loc4_56, %impl.elem0.loc4_58 [concrete = constants.%Convert.bound.94d]
  980. // CHECK:STDOUT: %int.convert_checked.loc4_58: init %i32.builtin = call %bound_method.loc4_58(%int_3.loc4_56) [concrete = constants.%int_3.a0f]
  981. // CHECK:STDOUT: %.loc4_58.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_58 [concrete = constants.%int_3.a0f]
  982. // CHECK:STDOUT: %.loc4_58.2: %i32.builtin = converted %int_3.loc4_56, %.loc4_58.1 [concrete = constants.%int_3.a0f]
  983. // CHECK:STDOUT: %int_4.loc4_69: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  984. // CHECK:STDOUT: %int_32.loc4_74: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  985. // CHECK:STDOUT: %int.make_type_signed.loc4_74: init type = call constants.%Int(%int_32.loc4_74) [concrete = constants.%i32.builtin]
  986. // CHECK:STDOUT: %.loc4_74.1: type = value_of_initializer %int.make_type_signed.loc4_74 [concrete = constants.%i32.builtin]
  987. // CHECK:STDOUT: %.loc4_74.2: type = converted %int.make_type_signed.loc4_74, %.loc4_74.1 [concrete = constants.%i32.builtin]
  988. // CHECK:STDOUT: %impl.elem0.loc4_71: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  989. // CHECK:STDOUT: %bound_method.loc4_71: <bound method> = bound_method %int_4.loc4_69, %impl.elem0.loc4_71 [concrete = constants.%Convert.bound.8fc]
  990. // CHECK:STDOUT: %int.convert_checked.loc4_71: init %i32.builtin = call %bound_method.loc4_71(%int_4.loc4_69) [concrete = constants.%int_4.4f1]
  991. // CHECK:STDOUT: %.loc4_71.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_71 [concrete = constants.%int_4.4f1]
  992. // CHECK:STDOUT: %.loc4_71.2: %i32.builtin = converted %int_4.loc4_69, %.loc4_71.1 [concrete = constants.%int_4.4f1]
  993. // CHECK:STDOUT: %impl.elem0.loc4_66: %.1e7 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%Op.9d1]
  994. // CHECK:STDOUT: %bound_method.loc4_66: <bound method> = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%Op.bound.703]
  995. // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_66(%.loc4_58.2, %.loc4_71.2) [concrete = constants.%int_7]
  996. // CHECK:STDOUT: %.loc4_78.1: %tuple.type = tuple_literal (%int_3.loc4_49, %int_4.loc4_52, %int.sadd)
  997. // CHECK:STDOUT: %impl.elem0.loc4_78.1: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5]
  998. // CHECK:STDOUT: %bound_method.loc4_78.1: <bound method> = bound_method %int_3.loc4_49, %impl.elem0.loc4_78.1 [concrete = constants.%Convert.bound.b6b]
  999. // CHECK:STDOUT: %int.convert_checked.loc4_78.1: init %i32.builtin = call %bound_method.loc4_78.1(%int_3.loc4_49) [concrete = constants.%int_3.a0f]
  1000. // CHECK:STDOUT: %.loc4_78.2: init %i32.builtin = converted %int_3.loc4_49, %int.convert_checked.loc4_78.1 [concrete = constants.%int_3.a0f]
  1001. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  1002. // CHECK:STDOUT: %.loc4_78.3: ref %i32.builtin = array_index file.%arr.var, %int_0
  1003. // CHECK:STDOUT: %.loc4_78.4: init %i32.builtin = initialize_from %.loc4_78.2 to %.loc4_78.3 [concrete = constants.%int_3.a0f]
  1004. // CHECK:STDOUT: %impl.elem0.loc4_78.2: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5]
  1005. // CHECK:STDOUT: %bound_method.loc4_78.2: <bound method> = bound_method %int_4.loc4_52, %impl.elem0.loc4_78.2 [concrete = constants.%Convert.bound.626]
  1006. // CHECK:STDOUT: %int.convert_checked.loc4_78.2: init %i32.builtin = call %bound_method.loc4_78.2(%int_4.loc4_52) [concrete = constants.%int_4.4f1]
  1007. // CHECK:STDOUT: %.loc4_78.5: init %i32.builtin = converted %int_4.loc4_52, %int.convert_checked.loc4_78.2 [concrete = constants.%int_4.4f1]
  1008. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1009. // CHECK:STDOUT: %.loc4_78.6: ref %i32.builtin = array_index file.%arr.var, %int_1
  1010. // CHECK:STDOUT: %.loc4_78.7: init %i32.builtin = initialize_from %.loc4_78.5 to %.loc4_78.6 [concrete = constants.%int_4.4f1]
  1011. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1012. // CHECK:STDOUT: %.loc4_78.8: ref %i32.builtin = array_index file.%arr.var, %int_2
  1013. // CHECK:STDOUT: %.loc4_78.9: init %i32.builtin = initialize_from %int.sadd to %.loc4_78.8 [concrete = constants.%int_7]
  1014. // CHECK:STDOUT: %.loc4_78.10: init %array_type = array_init (%.loc4_78.4, %.loc4_78.7, %.loc4_78.9) to file.%arr.var [concrete = constants.%array]
  1015. // CHECK:STDOUT: %.loc4_1: init %array_type = converted %.loc4_78.1, %.loc4_78.10 [concrete = constants.%array]
  1016. // CHECK:STDOUT: assign file.%arr.var, %.loc4_1
  1017. // CHECK:STDOUT: return
  1018. // CHECK:STDOUT: }
  1019. // CHECK:STDOUT:
  1020. // CHECK:STDOUT: specific @As(constants.%T) {
  1021. // CHECK:STDOUT: %T => constants.%T
  1022. // CHECK:STDOUT: }
  1023. // CHECK:STDOUT:
  1024. // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.65a) {
  1025. // CHECK:STDOUT: %T => constants.%T
  1026. // CHECK:STDOUT: %As.type => constants.%As.type.eed
  1027. // CHECK:STDOUT: %Self => constants.%Self.65a
  1028. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.04d
  1029. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.ca4
  1030. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc
  1031. // CHECK:STDOUT: }
  1032. // CHECK:STDOUT:
  1033. // CHECK:STDOUT: specific @As(constants.%i32.builtin) {
  1034. // CHECK:STDOUT: %T => constants.%i32.builtin
  1035. // CHECK:STDOUT:
  1036. // CHECK:STDOUT: !definition:
  1037. // CHECK:STDOUT: %As.type => constants.%As.type.a6d
  1038. // CHECK:STDOUT: %Self => constants.%Self.c25
  1039. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.378
  1040. // CHECK:STDOUT: %Convert => constants.%Convert.e51
  1041. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.bc2
  1042. // CHECK:STDOUT: %assoc0 => constants.%assoc0.9fb
  1043. // CHECK:STDOUT: }
  1044. // CHECK:STDOUT:
  1045. // CHECK:STDOUT: specific @AddWith(constants.%T) {
  1046. // CHECK:STDOUT: %T => constants.%T
  1047. // CHECK:STDOUT: }
  1048. // CHECK:STDOUT:
  1049. // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) {
  1050. // CHECK:STDOUT: %T => constants.%i32.builtin
  1051. // CHECK:STDOUT:
  1052. // CHECK:STDOUT: !definition:
  1053. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6f5
  1054. // CHECK:STDOUT: %Self => constants.%Self.ec3
  1055. // CHECK:STDOUT: %Op.type => constants.%Op.type.0b7
  1056. // CHECK:STDOUT: %Op => constants.%Op.9d6
  1057. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff
  1058. // CHECK:STDOUT: %assoc0 => constants.%assoc0.7f1
  1059. // CHECK:STDOUT: }
  1060. // CHECK:STDOUT:
  1061. // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.6c1) {
  1062. // CHECK:STDOUT: %T => constants.%T
  1063. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6d3
  1064. // CHECK:STDOUT: %Self => constants.%Self.6c1
  1065. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.030
  1066. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7fc
  1067. // CHECK:STDOUT: }
  1068. // CHECK:STDOUT:
  1069. // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
  1070. // CHECK:STDOUT: %T => constants.%T
  1071. // CHECK:STDOUT: }
  1072. // CHECK:STDOUT:
  1073. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) {
  1074. // CHECK:STDOUT: %T => constants.%i32.builtin
  1075. // CHECK:STDOUT:
  1076. // CHECK:STDOUT: !definition:
  1077. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.61e
  1078. // CHECK:STDOUT: %Self => constants.%Self.d28
  1079. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.059
  1080. // CHECK:STDOUT: %Convert => constants.%Convert.4d7
  1081. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.398
  1082. // CHECK:STDOUT: %assoc0 => constants.%assoc0.6fd
  1083. // CHECK:STDOUT: }
  1084. // CHECK:STDOUT:
  1085. // CHECK:STDOUT: specific @Convert.2(constants.%T, constants.%Self.519) {
  1086. // CHECK:STDOUT: %T => constants.%T
  1087. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62
  1088. // CHECK:STDOUT: %Self => constants.%Self.519
  1089. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.40a
  1090. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.f3e
  1091. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc
  1092. // CHECK:STDOUT: }
  1093. // CHECK:STDOUT:
  1094. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  1095. // CHECK:STDOUT: %T => Core.IntLiteral
  1096. // CHECK:STDOUT:
  1097. // CHECK:STDOUT: !definition:
  1098. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2fd
  1099. // CHECK:STDOUT: %Self => constants.%Self.9ac
  1100. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.71e
  1101. // CHECK:STDOUT: %Convert => constants.%Convert.0e2
  1102. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.959
  1103. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8c4
  1104. // CHECK:STDOUT: }
  1105. // CHECK:STDOUT: