call_from_operator.carbon 102 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/builtin/call_from_operator.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/builtin/call_from_operator.carbon
  14. // --- core.carbon
  15. package Core;
  16. fn IntLiteral() -> type = "int_literal.make_type";
  17. fn Int(N: IntLiteral()) -> type = "int.make_type_signed";
  18. interface AddWith(T:! type) {
  19. fn Op[self: Self](other: Self) -> Self;
  20. }
  21. interface As(T:! type) {
  22. fn Convert[self: Self]() -> T;
  23. }
  24. interface ImplicitAs(T:! type) {
  25. fn Convert[self: Self]() -> T;
  26. }
  27. impl i32 as AddWith(i32) {
  28. fn Op[self: Self](other: Self) -> Self = "int.sadd";
  29. }
  30. impl IntLiteral() as As(i32) {
  31. fn Convert[self: Self]() -> i32 = "int.convert_checked";
  32. }
  33. impl IntLiteral() as ImplicitAs(i32) {
  34. fn Convert[self: Self]() -> i32 = "int.convert_checked";
  35. }
  36. impl i32 as ImplicitAs(IntLiteral()) {
  37. fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked";
  38. }
  39. // --- user.carbon
  40. import Core;
  41. var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
  42. // CHECK:STDOUT: --- core.carbon
  43. // CHECK:STDOUT:
  44. // CHECK:STDOUT: constants {
  45. // CHECK:STDOUT: %.805: Core.Form = init_form type [concrete]
  46. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  47. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  48. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  49. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  50. // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
  51. // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
  52. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  53. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  54. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  55. // CHECK:STDOUT: %AddWith.type.b56: type = generic_interface_type @AddWith [concrete]
  56. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.b56 = struct_value () [concrete]
  57. // CHECK:STDOUT: %AddWith.type.26b: type = facet_type <@AddWith, @AddWith(%T)> [symbolic]
  58. // CHECK:STDOUT: %Self.a37: %AddWith.type.26b = symbolic_binding Self, 1 [symbolic]
  59. // CHECK:STDOUT: %Self.binding.as_type.73e: type = symbolic_binding_type Self, 1, %Self.a37 [symbolic]
  60. // CHECK:STDOUT: %pattern_type.1f3: type = pattern_type %Self.binding.as_type.73e [symbolic]
  61. // CHECK:STDOUT: %.409: Core.Form = init_form %Self.binding.as_type.73e [symbolic]
  62. // CHECK:STDOUT: %AddWith.WithSelf.Op.type.65a: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%T, %Self.a37) [symbolic]
  63. // CHECK:STDOUT: %AddWith.WithSelf.Op.647: %AddWith.WithSelf.Op.type.65a = struct_value () [symbolic]
  64. // CHECK:STDOUT: %AddWith.assoc_type.5ad: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic]
  65. // CHECK:STDOUT: %assoc0.90d: %AddWith.assoc_type.5ad = assoc_entity element0, @AddWith.WithSelf.%AddWith.WithSelf.Op.decl [symbolic]
  66. // CHECK:STDOUT: %As.type.3c9: type = generic_interface_type @As [concrete]
  67. // CHECK:STDOUT: %As.generic: %As.type.3c9 = struct_value () [concrete]
  68. // CHECK:STDOUT: %As.type.b54: type = facet_type <@As, @As(%T)> [symbolic]
  69. // CHECK:STDOUT: %Self.a8c: %As.type.b54 = symbolic_binding Self, 1 [symbolic]
  70. // CHECK:STDOUT: %Self.binding.as_type.69d: type = symbolic_binding_type Self, 1, %Self.a8c [symbolic]
  71. // CHECK:STDOUT: %pattern_type.24e: type = pattern_type %Self.binding.as_type.69d [symbolic]
  72. // CHECK:STDOUT: %.184: Core.Form = init_form %T [symbolic]
  73. // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
  74. // CHECK:STDOUT: %As.WithSelf.Convert.type.aef: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%T, %Self.a8c) [symbolic]
  75. // CHECK:STDOUT: %As.WithSelf.Convert.a95: %As.WithSelf.Convert.type.aef = struct_value () [symbolic]
  76. // CHECK:STDOUT: %As.assoc_type.520: type = assoc_entity_type @As, @As(%T) [symbolic]
  77. // CHECK:STDOUT: %assoc0.84c: %As.assoc_type.520 = assoc_entity element0, @As.WithSelf.%As.WithSelf.Convert.decl [symbolic]
  78. // CHECK:STDOUT: %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete]
  79. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete]
  80. // CHECK:STDOUT: %ImplicitAs.type.9fe: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
  81. // CHECK:STDOUT: %Self.7c0: %ImplicitAs.type.9fe = symbolic_binding Self, 1 [symbolic]
  82. // CHECK:STDOUT: %Self.binding.as_type.984: type = symbolic_binding_type Self, 1, %Self.7c0 [symbolic]
  83. // CHECK:STDOUT: %pattern_type.8de: type = pattern_type %Self.binding.as_type.984 [symbolic]
  84. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.f6b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%T, %Self.7c0) [symbolic]
  85. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.de0: %ImplicitAs.WithSelf.Convert.type.f6b = struct_value () [symbolic]
  86. // CHECK:STDOUT: %ImplicitAs.assoc_type.b04: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic]
  87. // CHECK:STDOUT: %assoc0.361: %ImplicitAs.assoc_type.b04 = assoc_entity element0, @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl [symbolic]
  88. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  89. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  90. // CHECK:STDOUT: %AddWith.type.aed: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete]
  91. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness @i32.builtin.as.AddWith.impl.%AddWith.impl_witness_table [concrete]
  92. // CHECK:STDOUT: %Self.aad: %AddWith.type.aed = symbolic_binding Self, 1 [symbolic]
  93. // CHECK:STDOUT: %AddWith.WithSelf.Op.type.479: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%i32.builtin, %Self.a37) [symbolic]
  94. // CHECK:STDOUT: %AddWith.WithSelf.Op.8bc: %AddWith.WithSelf.Op.type.479 = struct_value () [symbolic]
  95. // CHECK:STDOUT: %AddWith.assoc_type.97c: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete]
  96. // CHECK:STDOUT: %assoc0.4d8: %AddWith.assoc_type.97c = assoc_entity element0, @AddWith.WithSelf.%AddWith.WithSelf.Op.decl [concrete]
  97. // CHECK:STDOUT: %pattern_type.956: type = pattern_type %i32.builtin [concrete]
  98. // CHECK:STDOUT: %.9cb: Core.Form = init_form %i32.builtin [concrete]
  99. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.type: type = fn_type @i32.builtin.as.AddWith.impl.Op [concrete]
  100. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op: %i32.builtin.as.AddWith.impl.Op.type = struct_value () [concrete]
  101. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.aed = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete]
  102. // CHECK:STDOUT: %AddWith.WithSelf.Op.type.493: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%i32.builtin, %AddWith.facet) [concrete]
  103. // CHECK:STDOUT: %AddWith.WithSelf.Op.d6a: %AddWith.WithSelf.Op.type.493 = struct_value () [concrete]
  104. // CHECK:STDOUT: %As.type.1ed: type = facet_type <@As, @As(%i32.builtin)> [concrete]
  105. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness @Core.IntLiteral.as.As.impl.%As.impl_witness_table [concrete]
  106. // CHECK:STDOUT: %Self.037: %As.type.1ed = symbolic_binding Self, 1 [symbolic]
  107. // CHECK:STDOUT: %As.WithSelf.Convert.type.a02: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i32.builtin, %Self.a8c) [symbolic]
  108. // CHECK:STDOUT: %As.WithSelf.Convert.98f: %As.WithSelf.Convert.type.a02 = struct_value () [symbolic]
  109. // CHECK:STDOUT: %As.assoc_type.c44: type = assoc_entity_type @As, @As(%i32.builtin) [concrete]
  110. // CHECK:STDOUT: %assoc0.43d: %As.assoc_type.c44 = assoc_entity element0, @As.WithSelf.%As.WithSelf.Convert.decl [concrete]
  111. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  112. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  113. // CHECK:STDOUT: %As.facet: %As.type.1ed = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  114. // CHECK:STDOUT: %As.WithSelf.Convert.type.204: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i32.builtin, %As.facet) [concrete]
  115. // CHECK:STDOUT: %As.WithSelf.Convert.24c: %As.WithSelf.Convert.type.204 = struct_value () [concrete]
  116. // CHECK:STDOUT: %ImplicitAs.type.92b: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
  117. // CHECK:STDOUT: %ImplicitAs.impl_witness.ccd: <witness> = impl_witness @Core.IntLiteral.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete]
  118. // CHECK:STDOUT: %Self.597: %ImplicitAs.type.92b = symbolic_binding Self, 1 [symbolic]
  119. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.d4c: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32.builtin, %Self.7c0) [symbolic]
  120. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.086: %ImplicitAs.WithSelf.Convert.type.d4c = struct_value () [symbolic]
  121. // CHECK:STDOUT: %ImplicitAs.assoc_type.c3f: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete]
  122. // CHECK:STDOUT: %assoc0.124: %ImplicitAs.assoc_type.c3f = assoc_entity element0, @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl [concrete]
  123. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  124. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  125. // CHECK:STDOUT: %ImplicitAs.facet.b36: %ImplicitAs.type.92b = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.ccd) [concrete]
  126. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.07c: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32.builtin, %ImplicitAs.facet.b36) [concrete]
  127. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.a38: %ImplicitAs.WithSelf.Convert.type.07c = struct_value () [concrete]
  128. // CHECK:STDOUT: %ImplicitAs.type.79c: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  129. // CHECK:STDOUT: %ImplicitAs.impl_witness.985: <witness> = impl_witness @i32.builtin.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete]
  130. // CHECK:STDOUT: %Self.55f: %ImplicitAs.type.79c = symbolic_binding Self, 1 [symbolic]
  131. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.25a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(Core.IntLiteral, %Self.7c0) [symbolic]
  132. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1ae: %ImplicitAs.WithSelf.Convert.type.25a = struct_value () [symbolic]
  133. // CHECK:STDOUT: %ImplicitAs.assoc_type.793: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete]
  134. // CHECK:STDOUT: %assoc0.e18: %ImplicitAs.assoc_type.793 = assoc_entity element0, @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl [concrete]
  135. // CHECK:STDOUT: %.f7d: Core.Form = init_form Core.IntLiteral [concrete]
  136. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.builtin.as.ImplicitAs.impl.Convert [concrete]
  137. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert: %i32.builtin.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  138. // CHECK:STDOUT: %ImplicitAs.facet.c5c: %ImplicitAs.type.79c = facet_value %i32.builtin, (%ImplicitAs.impl_witness.985) [concrete]
  139. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.7aa: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(Core.IntLiteral, %ImplicitAs.facet.c5c) [concrete]
  140. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.090: %ImplicitAs.WithSelf.Convert.type.7aa = struct_value () [concrete]
  141. // CHECK:STDOUT: }
  142. // CHECK:STDOUT:
  143. // CHECK:STDOUT: file {
  144. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  145. // CHECK:STDOUT: .IntLiteral = %IntLiteral.decl
  146. // CHECK:STDOUT: .Int = %Int.decl
  147. // CHECK:STDOUT: .AddWith = %AddWith.decl
  148. // CHECK:STDOUT: .As = %As.decl
  149. // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT: %IntLiteral.decl: %IntLiteral.type = fn_decl @IntLiteral [concrete = constants.%IntLiteral] {
  152. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  153. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt [concrete]
  154. // CHECK:STDOUT: } {
  155. // CHECK:STDOUT: %.loc4_20.1: type = type_literal type [concrete = type]
  156. // CHECK:STDOUT: %.loc4_20.2: Core.Form = init_form %.loc4_20.1 [concrete = constants.%.805]
  157. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  158. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [concrete = constants.%Int] {
  161. // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = value_binding_pattern N [concrete]
  162. // CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern %N.patt [concrete]
  163. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  164. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt [concrete]
  165. // CHECK:STDOUT: } {
  166. // CHECK:STDOUT: %.loc5_28.1: type = type_literal type [concrete = type]
  167. // CHECK:STDOUT: %.loc5_28.2: Core.Form = init_form %.loc5_28.1 [concrete = constants.%.805]
  168. // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param call_param0
  169. // CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = Core.IntLiteral] {
  170. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  171. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  172. // CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  173. // CHECK:STDOUT: %.loc5_22.3: type = converted %IntLiteral.call, %.loc5_22.2 [concrete = Core.IntLiteral]
  174. // CHECK:STDOUT: }
  175. // CHECK:STDOUT: %N: Core.IntLiteral = value_binding N, %N.param
  176. // CHECK:STDOUT: %return.param: ref type = out_param call_param1
  177. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  178. // CHECK:STDOUT: }
  179. // CHECK:STDOUT: %AddWith.decl: %AddWith.type.b56 = interface_decl @AddWith [concrete = constants.%AddWith.generic] {
  180. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  181. // CHECK:STDOUT: } {
  182. // CHECK:STDOUT: %.loc7_23.1: type = splice_block %.loc7_23.2 [concrete = type] {
  183. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  184. // CHECK:STDOUT: %.loc7_23.2: type = type_literal type [concrete = type]
  185. // CHECK:STDOUT: }
  186. // CHECK:STDOUT: %T.loc7_19.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_19.1 (constants.%T)]
  187. // CHECK:STDOUT: }
  188. // CHECK:STDOUT: %As.decl: %As.type.3c9 = interface_decl @As [concrete = constants.%As.generic] {
  189. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  190. // CHECK:STDOUT: } {
  191. // CHECK:STDOUT: %.loc11_18.1: type = splice_block %.loc11_18.2 [concrete = type] {
  192. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  193. // CHECK:STDOUT: %.loc11_18.2: type = type_literal type [concrete = type]
  194. // CHECK:STDOUT: }
  195. // CHECK:STDOUT: %T.loc11_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.1 (constants.%T)]
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.595 = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
  198. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  199. // CHECK:STDOUT: } {
  200. // CHECK:STDOUT: %.loc15_26.1: type = splice_block %.loc15_26.2 [concrete = type] {
  201. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  202. // CHECK:STDOUT: %.loc15_26.2: type = type_literal type [concrete = type]
  203. // CHECK:STDOUT: }
  204. // CHECK:STDOUT: %T.loc15_22.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_22.1 (constants.%T)]
  205. // CHECK:STDOUT: }
  206. // CHECK:STDOUT: impl_decl @i32.builtin.as.AddWith.impl [concrete] {} {
  207. // CHECK:STDOUT: %.loc19_6: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  208. // CHECK:STDOUT: %AddWith.ref: %AddWith.type.b56 = name_ref AddWith, file.%AddWith.decl [concrete = constants.%AddWith.generic]
  209. // CHECK:STDOUT: %.loc19_21: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  210. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%i32.builtin)> [concrete = constants.%AddWith.type.aed]
  211. // CHECK:STDOUT: }
  212. // CHECK:STDOUT: impl_decl @Core.IntLiteral.as.As.impl [concrete] {} {
  213. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  214. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  215. // CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  216. // CHECK:STDOUT: %.loc23_17.2: type = converted %IntLiteral.call, %.loc23_17.1 [concrete = Core.IntLiteral]
  217. // CHECK:STDOUT: %As.ref: %As.type.3c9 = name_ref As, file.%As.decl [concrete = constants.%As.generic]
  218. // CHECK:STDOUT: %.loc23_25: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  219. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32.builtin)> [concrete = constants.%As.type.1ed]
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT: impl_decl @Core.IntLiteral.as.ImplicitAs.impl [concrete] {} {
  222. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  223. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  224. // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  225. // CHECK:STDOUT: %.loc27_17.2: type = converted %IntLiteral.call, %.loc27_17.1 [concrete = Core.IntLiteral]
  226. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.595 = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic]
  227. // CHECK:STDOUT: %.loc27_33: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  228. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [concrete = constants.%ImplicitAs.type.92b]
  229. // CHECK:STDOUT: }
  230. // CHECK:STDOUT: impl_decl @i32.builtin.as.ImplicitAs.impl [concrete] {} {
  231. // CHECK:STDOUT: %.loc31_6: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  232. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.595 = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic]
  233. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  234. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  235. // CHECK:STDOUT: %.loc31_36.1: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  236. // CHECK:STDOUT: %.loc31_36.2: type = converted %IntLiteral.call, %.loc31_36.1 [concrete = Core.IntLiteral]
  237. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete = constants.%ImplicitAs.type.79c]
  238. // CHECK:STDOUT: }
  239. // CHECK:STDOUT: }
  240. // CHECK:STDOUT:
  241. // CHECK:STDOUT: generic interface @AddWith(%T.loc7_19.2: type) {
  242. // CHECK:STDOUT: %T.loc7_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_19.1 (constants.%T)]
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: !definition:
  245. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc7_19.1)> [symbolic = %AddWith.type (constants.%AddWith.type.26b)]
  246. // CHECK:STDOUT: %Self.loc7_29.2: @AddWith.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self.loc7_29.2 (constants.%Self.a37)]
  247. // CHECK:STDOUT:
  248. // CHECK:STDOUT: interface {
  249. // CHECK:STDOUT: %Self.loc7_29.1: @AddWith.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self.loc7_29.2 (constants.%Self.a37)]
  250. // CHECK:STDOUT: %AddWith.WithSelf.decl = interface_with_self_decl @AddWith [concrete]
  251. // CHECK:STDOUT:
  252. // CHECK:STDOUT: !with Self:
  253. // CHECK:STDOUT: %AddWith.WithSelf.Op.decl: @AddWith.WithSelf.%AddWith.WithSelf.Op.type (%AddWith.WithSelf.Op.type.65a) = fn_decl @AddWith.WithSelf.Op [symbolic = @AddWith.WithSelf.%AddWith.WithSelf.Op (constants.%AddWith.WithSelf.Op.647)] {
  254. // CHECK:STDOUT: %self.patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_binding_pattern self [concrete]
  255. // CHECK:STDOUT: %self.param_patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_param_pattern %self.patt [concrete]
  256. // CHECK:STDOUT: %other.patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_binding_pattern other [concrete]
  257. // CHECK:STDOUT: %other.param_patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_param_pattern %other.patt [concrete]
  258. // CHECK:STDOUT: %return.patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = return_slot_pattern [concrete]
  259. // CHECK:STDOUT: %return.param_patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = out_param_pattern %return.patt [concrete]
  260. // CHECK:STDOUT: } {
  261. // CHECK:STDOUT: %.loc8_37.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)]
  262. // CHECK:STDOUT: %Self.ref.loc8_37: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_37.2 [symbolic = %Self (constants.%Self.a37)]
  263. // CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  264. // CHECK:STDOUT: %.loc8_37.3: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  265. // CHECK:STDOUT: %.loc8_37.4: Core.Form = init_form %.loc8_37.3 [symbolic = %.loc8_37.1 (constants.%.409)]
  266. // CHECK:STDOUT: %self.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_param call_param0
  267. // CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] {
  268. // CHECK:STDOUT: %.loc8_15.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)]
  269. // CHECK:STDOUT: %Self.ref.loc8_15: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_15.2 [symbolic = %Self (constants.%Self.a37)]
  270. // CHECK:STDOUT: %Self.as_type.loc8_15: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  271. // CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT: %self: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_binding self, %self.param
  274. // CHECK:STDOUT: %other.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_param call_param1
  275. // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] {
  276. // CHECK:STDOUT: %.loc8_28.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)]
  277. // CHECK:STDOUT: %Self.ref.loc8_28: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_28.2 [symbolic = %Self (constants.%Self.a37)]
  278. // CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  279. // CHECK:STDOUT: %.loc8_28.3: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  280. // CHECK:STDOUT: }
  281. // CHECK:STDOUT: %other: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_binding other, %other.param
  282. // CHECK:STDOUT: %return.param: ref @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = out_param call_param2
  283. // CHECK:STDOUT: %return: ref @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = return_slot %return.param
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT: %assoc0.loc8_41.1: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type.5ad) = assoc_entity element0, %AddWith.WithSelf.Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.90d)]
  286. // CHECK:STDOUT:
  287. // CHECK:STDOUT: !members:
  288. // CHECK:STDOUT: .Self = %Self.loc7_29.1
  289. // CHECK:STDOUT: .Op = @AddWith.WithSelf.%assoc0.loc8_41.1
  290. // CHECK:STDOUT: witness = (@AddWith.WithSelf.%AddWith.WithSelf.Op.decl)
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: !requires:
  293. // CHECK:STDOUT: }
  294. // CHECK:STDOUT: }
  295. // CHECK:STDOUT:
  296. // CHECK:STDOUT: generic interface @As(%T.loc11_14.2: type) {
  297. // CHECK:STDOUT: %T.loc11_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.1 (constants.%T)]
  298. // CHECK:STDOUT:
  299. // CHECK:STDOUT: !definition:
  300. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc11_14.1)> [symbolic = %As.type (constants.%As.type.b54)]
  301. // CHECK:STDOUT: %Self.loc11_24.2: @As.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self.loc11_24.2 (constants.%Self.a8c)]
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: interface {
  304. // CHECK:STDOUT: %Self.loc11_24.1: @As.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self.loc11_24.2 (constants.%Self.a8c)]
  305. // CHECK:STDOUT: %As.WithSelf.decl = interface_with_self_decl @As [concrete]
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: !with Self:
  308. // CHECK:STDOUT: %As.WithSelf.Convert.decl: @As.WithSelf.%As.WithSelf.Convert.type (%As.WithSelf.Convert.type.aef) = fn_decl @As.WithSelf.Convert [symbolic = @As.WithSelf.%As.WithSelf.Convert (constants.%As.WithSelf.Convert.a95)] {
  309. // CHECK:STDOUT: %self.patt: @As.WithSelf.Convert.%pattern_type.loc12_14 (%pattern_type.24e) = value_binding_pattern self [concrete]
  310. // CHECK:STDOUT: %self.param_patt: @As.WithSelf.Convert.%pattern_type.loc12_14 (%pattern_type.24e) = value_param_pattern %self.patt [concrete]
  311. // CHECK:STDOUT: %return.patt: @As.WithSelf.Convert.%pattern_type.loc12_28 (%pattern_type.51d) = return_slot_pattern [concrete]
  312. // CHECK:STDOUT: %return.param_patt: @As.WithSelf.Convert.%pattern_type.loc12_28 (%pattern_type.51d) = out_param_pattern %return.patt [concrete]
  313. // CHECK:STDOUT: } {
  314. // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.2 [symbolic = %T (constants.%T)]
  315. // CHECK:STDOUT: %.loc12_31.2: Core.Form = init_form %T.ref [symbolic = %.loc12_31.1 (constants.%.184)]
  316. // CHECK:STDOUT: %self.param: @As.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.69d) = value_param call_param0
  317. // CHECK:STDOUT: %.loc12_20.1: type = splice_block %.loc12_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)] {
  318. // CHECK:STDOUT: %.loc12_20.2: @As.WithSelf.Convert.%As.type (%As.type.b54) = specific_constant @As.%Self.loc11_24.1, @As(constants.%T) [symbolic = %Self (constants.%Self.a8c)]
  319. // CHECK:STDOUT: %Self.ref: @As.WithSelf.Convert.%As.type (%As.type.b54) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.a8c)]
  320. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)]
  321. // CHECK:STDOUT: %.loc12_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)]
  322. // CHECK:STDOUT: }
  323. // CHECK:STDOUT: %self: @As.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.69d) = value_binding self, %self.param
  324. // CHECK:STDOUT: %return.param: ref @As.WithSelf.Convert.%T (%T) = out_param call_param1
  325. // CHECK:STDOUT: %return: ref @As.WithSelf.Convert.%T (%T) = return_slot %return.param
  326. // CHECK:STDOUT: }
  327. // CHECK:STDOUT: %assoc0.loc12_32.1: @As.WithSelf.%As.assoc_type (%As.assoc_type.520) = assoc_entity element0, %As.WithSelf.Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.84c)]
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: !members:
  330. // CHECK:STDOUT: .Self = %Self.loc11_24.1
  331. // CHECK:STDOUT: .T = <poisoned>
  332. // CHECK:STDOUT: .T = <poisoned>
  333. // CHECK:STDOUT: .Convert = @As.WithSelf.%assoc0.loc12_32.1
  334. // CHECK:STDOUT: witness = (@As.WithSelf.%As.WithSelf.Convert.decl)
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: !requires:
  337. // CHECK:STDOUT: }
  338. // CHECK:STDOUT: }
  339. // CHECK:STDOUT:
  340. // CHECK:STDOUT: generic interface @ImplicitAs(%T.loc15_22.2: type) {
  341. // CHECK:STDOUT: %T.loc15_22.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_22.1 (constants.%T)]
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: !definition:
  344. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc15_22.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)]
  345. // CHECK:STDOUT: %Self.loc15_32.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_32.2 (constants.%Self.7c0)]
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: interface {
  348. // CHECK:STDOUT: %Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_32.2 (constants.%Self.7c0)]
  349. // CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete]
  350. // CHECK:STDOUT:
  351. // CHECK:STDOUT: !with Self:
  352. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.f6b) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.de0)] {
  353. // CHECK:STDOUT: %self.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_14 (%pattern_type.8de) = value_binding_pattern self [concrete]
  354. // CHECK:STDOUT: %self.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_14 (%pattern_type.8de) = value_param_pattern %self.patt [concrete]
  355. // CHECK:STDOUT: %return.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_28 (%pattern_type.51d) = return_slot_pattern [concrete]
  356. // CHECK:STDOUT: %return.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_28 (%pattern_type.51d) = out_param_pattern %return.patt [concrete]
  357. // CHECK:STDOUT: } {
  358. // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.2 [symbolic = %T (constants.%T)]
  359. // CHECK:STDOUT: %.loc16_31.2: Core.Form = init_form %T.ref [symbolic = %.loc16_31.1 (constants.%.184)]
  360. // CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.984) = value_param call_param0
  361. // CHECK:STDOUT: %.loc16_20.1: type = splice_block %.loc16_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)] {
  362. // CHECK:STDOUT: %.loc16_20.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc15_32.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.7c0)]
  363. // CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.7c0)]
  364. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)]
  365. // CHECK:STDOUT: %.loc16_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)]
  366. // CHECK:STDOUT: }
  367. // CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.984) = value_binding self, %self.param
  368. // CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%T (%T) = out_param call_param1
  369. // CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%T (%T) = return_slot %return.param
  370. // CHECK:STDOUT: }
  371. // CHECK:STDOUT: %assoc0.loc16_32.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.b04) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.361)]
  372. // CHECK:STDOUT:
  373. // CHECK:STDOUT: !members:
  374. // CHECK:STDOUT: .Self = %Self.loc15_32.1
  375. // CHECK:STDOUT: .T = <poisoned>
  376. // CHECK:STDOUT: .T = <poisoned>
  377. // CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc16_32.1
  378. // CHECK:STDOUT: witness = (@ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl)
  379. // CHECK:STDOUT:
  380. // CHECK:STDOUT: !requires:
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT: }
  383. // CHECK:STDOUT:
  384. // CHECK:STDOUT: impl @i32.builtin.as.AddWith.impl: %.loc19_6 as %AddWith.type {
  385. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.decl: %i32.builtin.as.AddWith.impl.Op.type = fn_decl @i32.builtin.as.AddWith.impl.Op [concrete = constants.%i32.builtin.as.AddWith.impl.Op] {
  386. // CHECK:STDOUT: %self.patt: %pattern_type.956 = value_binding_pattern self [concrete]
  387. // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt [concrete]
  388. // CHECK:STDOUT: %other.patt: %pattern_type.956 = value_binding_pattern other [concrete]
  389. // CHECK:STDOUT: %other.param_patt: %pattern_type.956 = value_param_pattern %other.patt [concrete]
  390. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  391. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt [concrete]
  392. // CHECK:STDOUT: } {
  393. // CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc19_6 [concrete = constants.%i32.builtin]
  394. // CHECK:STDOUT: %.loc20: Core.Form = init_form %Self.ref.loc20_37 [concrete = constants.%.9cb]
  395. // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0
  396. // CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc19_6 [concrete = constants.%i32.builtin]
  397. // CHECK:STDOUT: %self: %i32.builtin = value_binding self, %self.param
  398. // CHECK:STDOUT: %other.param: %i32.builtin = value_param call_param1
  399. // CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @i32.builtin.as.AddWith.impl.%.loc19_6 [concrete = constants.%i32.builtin]
  400. // CHECK:STDOUT: %other: %i32.builtin = value_binding other, %other.param
  401. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param2
  402. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  403. // CHECK:STDOUT: }
  404. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%i32.builtin.as.AddWith.impl.Op.decl), @i32.builtin.as.AddWith.impl [concrete]
  405. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness %AddWith.impl_witness_table [concrete = constants.%AddWith.impl_witness]
  406. // CHECK:STDOUT:
  407. // CHECK:STDOUT: !members:
  408. // CHECK:STDOUT: .Op = %i32.builtin.as.AddWith.impl.Op.decl
  409. // CHECK:STDOUT: witness = %AddWith.impl_witness
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: impl @Core.IntLiteral.as.As.impl: %.loc23_17.2 as %As.type {
  413. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.decl: %Core.IntLiteral.as.As.impl.Convert.type = fn_decl @Core.IntLiteral.as.As.impl.Convert [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] {
  414. // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = value_binding_pattern self [concrete]
  415. // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern %self.patt [concrete]
  416. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  417. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt [concrete]
  418. // CHECK:STDOUT: } {
  419. // CHECK:STDOUT: %.loc24_31.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  420. // CHECK:STDOUT: %.loc24_31.2: Core.Form = init_form %.loc24_31.1 [concrete = constants.%.9cb]
  421. // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0
  422. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @Core.IntLiteral.as.As.impl.%.loc23_17.2 [concrete = Core.IntLiteral]
  423. // CHECK:STDOUT: %self: Core.IntLiteral = value_binding self, %self.param
  424. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
  425. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  426. // CHECK:STDOUT: }
  427. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.IntLiteral.as.As.impl.Convert.decl), @Core.IntLiteral.as.As.impl [concrete]
  428. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness %As.impl_witness_table [concrete = constants.%As.impl_witness]
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: !members:
  431. // CHECK:STDOUT: .Convert = %Core.IntLiteral.as.As.impl.Convert.decl
  432. // CHECK:STDOUT: witness = %As.impl_witness
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: impl @Core.IntLiteral.as.ImplicitAs.impl: %.loc27_17.2 as %ImplicitAs.type {
  436. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.decl: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = fn_decl @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] {
  437. // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = value_binding_pattern self [concrete]
  438. // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern %self.patt [concrete]
  439. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  440. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt [concrete]
  441. // CHECK:STDOUT: } {
  442. // CHECK:STDOUT: %.loc28_31.1: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  443. // CHECK:STDOUT: %.loc28_31.2: Core.Form = init_form %.loc28_31.1 [concrete = constants.%.9cb]
  444. // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0
  445. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @Core.IntLiteral.as.ImplicitAs.impl.%.loc27_17.2 [concrete = Core.IntLiteral]
  446. // CHECK:STDOUT: %self: Core.IntLiteral = value_binding self, %self.param
  447. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
  448. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  449. // CHECK:STDOUT: }
  450. // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (%Core.IntLiteral.as.ImplicitAs.impl.Convert.decl), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  451. // CHECK:STDOUT: %ImplicitAs.impl_witness: <witness> = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness.ccd]
  452. // CHECK:STDOUT:
  453. // CHECK:STDOUT: !members:
  454. // CHECK:STDOUT: .Convert = %Core.IntLiteral.as.ImplicitAs.impl.Convert.decl
  455. // CHECK:STDOUT: witness = %ImplicitAs.impl_witness
  456. // CHECK:STDOUT: }
  457. // CHECK:STDOUT:
  458. // CHECK:STDOUT: impl @i32.builtin.as.ImplicitAs.impl: %.loc31_6 as %ImplicitAs.type {
  459. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.decl: %i32.builtin.as.ImplicitAs.impl.Convert.type = fn_decl @i32.builtin.as.ImplicitAs.impl.Convert [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert] {
  460. // CHECK:STDOUT: %self.patt: %pattern_type.956 = value_binding_pattern self [concrete]
  461. // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt [concrete]
  462. // CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern [concrete]
  463. // CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern %return.patt [concrete]
  464. // CHECK:STDOUT: } {
  465. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  466. // CHECK:STDOUT: %IntLiteral.call: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  467. // CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %IntLiteral.call [concrete = Core.IntLiteral]
  468. // CHECK:STDOUT: %.loc32_42.2: type = converted %IntLiteral.call, %.loc32_42.1 [concrete = Core.IntLiteral]
  469. // CHECK:STDOUT: %.loc32_42.3: Core.Form = init_form %.loc32_42.2 [concrete = constants.%.f7d]
  470. // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0
  471. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @i32.builtin.as.ImplicitAs.impl.%.loc31_6 [concrete = constants.%i32.builtin]
  472. // CHECK:STDOUT: %self: %i32.builtin = value_binding self, %self.param
  473. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1
  474. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (%i32.builtin.as.ImplicitAs.impl.Convert.decl), @i32.builtin.as.ImplicitAs.impl [concrete]
  477. // CHECK:STDOUT: %ImplicitAs.impl_witness: <witness> = impl_witness %ImplicitAs.impl_witness_table [concrete = constants.%ImplicitAs.impl_witness.985]
  478. // CHECK:STDOUT:
  479. // CHECK:STDOUT: !members:
  480. // CHECK:STDOUT: .IntLiteral = <poisoned>
  481. // CHECK:STDOUT: .Convert = %i32.builtin.as.ImplicitAs.impl.Convert.decl
  482. // CHECK:STDOUT: witness = %ImplicitAs.impl_witness
  483. // CHECK:STDOUT: }
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type";
  486. // CHECK:STDOUT:
  487. // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed";
  488. // CHECK:STDOUT:
  489. // CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(@AddWith.%T.loc7_19.2: type, @AddWith.%Self.loc7_29.1: @AddWith.%AddWith.type (%AddWith.type.26b)) {
  490. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  491. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.26b)]
  492. // CHECK:STDOUT: %Self: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a37)]
  493. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)]
  494. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.1f3)]
  495. // CHECK:STDOUT: %.loc8_37.1: Core.Form = init_form %Self.binding.as_type [symbolic = %.loc8_37.1 (constants.%.409)]
  496. // CHECK:STDOUT:
  497. // CHECK:STDOUT: fn(%self.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e), %other.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e)) -> out %return.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e);
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT:
  500. // CHECK:STDOUT: generic fn @As.WithSelf.Convert(@As.%T.loc11_14.2: type, @As.%Self.loc11_24.1: @As.%As.type (%As.type.b54)) {
  501. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  502. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.b54)]
  503. // CHECK:STDOUT: %Self: @As.WithSelf.Convert.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a8c)]
  504. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)]
  505. // CHECK:STDOUT: %pattern_type.loc12_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc12_14 (constants.%pattern_type.24e)]
  506. // CHECK:STDOUT: %.loc12_31.1: Core.Form = init_form %T [symbolic = %.loc12_31.1 (constants.%.184)]
  507. // CHECK:STDOUT: %pattern_type.loc12_28: type = pattern_type %T [symbolic = %pattern_type.loc12_28 (constants.%pattern_type.51d)]
  508. // CHECK:STDOUT:
  509. // CHECK:STDOUT: fn(%self.param: @As.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.69d)) -> out %return.param: @As.WithSelf.Convert.%T (%T);
  510. // CHECK:STDOUT: }
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc15_22.2: type, @ImplicitAs.%Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe)) {
  513. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  514. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)]
  515. // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.7c0)]
  516. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)]
  517. // CHECK:STDOUT: %pattern_type.loc16_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc16_14 (constants.%pattern_type.8de)]
  518. // CHECK:STDOUT: %.loc16_31.1: Core.Form = init_form %T [symbolic = %.loc16_31.1 (constants.%.184)]
  519. // CHECK:STDOUT: %pattern_type.loc16_28: type = pattern_type %T [symbolic = %pattern_type.loc16_28 (constants.%pattern_type.51d)]
  520. // CHECK:STDOUT:
  521. // CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.984)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%T (%T);
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT:
  524. // CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op(%self.param: %i32.builtin, %other.param: %i32.builtin) -> out %return.param: %i32.builtin = "int.sadd";
  525. // CHECK:STDOUT:
  526. // CHECK:STDOUT: fn @Core.IntLiteral.as.As.impl.Convert(%self.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked";
  527. // CHECK:STDOUT:
  528. // CHECK:STDOUT: fn @Core.IntLiteral.as.ImplicitAs.impl.Convert(%self.param: Core.IntLiteral) -> out %return.param: %i32.builtin = "int.convert_checked";
  529. // CHECK:STDOUT:
  530. // CHECK:STDOUT: fn @i32.builtin.as.ImplicitAs.impl.Convert(%self.param: %i32.builtin) -> out %return.param: Core.IntLiteral = "int.convert_checked";
  531. // CHECK:STDOUT:
  532. // CHECK:STDOUT: specific @AddWith(constants.%T) {
  533. // CHECK:STDOUT: %T.loc7_19.1 => constants.%T
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%T, constants.%Self.a37) {}
  537. // CHECK:STDOUT:
  538. // CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%T, constants.%Self.a37) {
  539. // CHECK:STDOUT: %T => constants.%T
  540. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.26b
  541. // CHECK:STDOUT: %Self => constants.%Self.a37
  542. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.73e
  543. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1f3
  544. // CHECK:STDOUT: %.loc8_37.1 => constants.%.409
  545. // CHECK:STDOUT: }
  546. // CHECK:STDOUT:
  547. // CHECK:STDOUT: specific @As(constants.%T) {
  548. // CHECK:STDOUT: %T.loc11_14.1 => constants.%T
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: specific @As.WithSelf(constants.%T, constants.%Self.a8c) {}
  552. // CHECK:STDOUT:
  553. // CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%T, constants.%Self.a8c) {
  554. // CHECK:STDOUT: %T => constants.%T
  555. // CHECK:STDOUT: %As.type => constants.%As.type.b54
  556. // CHECK:STDOUT: %Self => constants.%Self.a8c
  557. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.69d
  558. // CHECK:STDOUT: %pattern_type.loc12_14 => constants.%pattern_type.24e
  559. // CHECK:STDOUT: %.loc12_31.1 => constants.%.184
  560. // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.51d
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
  564. // CHECK:STDOUT: %T.loc15_22.1 => constants.%T
  565. // CHECK:STDOUT: }
  566. // CHECK:STDOUT:
  567. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%T, constants.%Self.7c0) {}
  568. // CHECK:STDOUT:
  569. // CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%T, constants.%Self.7c0) {
  570. // CHECK:STDOUT: %T => constants.%T
  571. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fe
  572. // CHECK:STDOUT: %Self => constants.%Self.7c0
  573. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.984
  574. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.8de
  575. // CHECK:STDOUT: %.loc16_31.1 => constants.%.184
  576. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.51d
  577. // CHECK:STDOUT: }
  578. // CHECK:STDOUT:
  579. // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) {
  580. // CHECK:STDOUT: %T.loc7_19.1 => constants.%i32.builtin
  581. // CHECK:STDOUT:
  582. // CHECK:STDOUT: !definition:
  583. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.aed
  584. // CHECK:STDOUT: %Self.loc7_29.2 => constants.%Self.aad
  585. // CHECK:STDOUT: }
  586. // CHECK:STDOUT:
  587. // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%Self.a37) {
  588. // CHECK:STDOUT: !definition:
  589. // CHECK:STDOUT: %T => constants.%i32.builtin
  590. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.aed
  591. // CHECK:STDOUT: %Self => constants.%Self.a37
  592. // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.479
  593. // CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.8bc
  594. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.97c
  595. // CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.4d8
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT:
  598. // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%AddWith.facet) {
  599. // CHECK:STDOUT: !definition:
  600. // CHECK:STDOUT: %T => constants.%i32.builtin
  601. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.aed
  602. // CHECK:STDOUT: %Self => constants.%AddWith.facet
  603. // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.493
  604. // CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.d6a
  605. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.97c
  606. // CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.4d8
  607. // CHECK:STDOUT: }
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%i32.builtin, constants.%AddWith.facet) {
  610. // CHECK:STDOUT: %T => constants.%i32.builtin
  611. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.aed
  612. // CHECK:STDOUT: %Self => constants.%AddWith.facet
  613. // CHECK:STDOUT: %Self.binding.as_type => constants.%i32.builtin
  614. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.956
  615. // CHECK:STDOUT: %.loc8_37.1 => constants.%.9cb
  616. // CHECK:STDOUT: }
  617. // CHECK:STDOUT:
  618. // CHECK:STDOUT: specific @As(constants.%i32.builtin) {
  619. // CHECK:STDOUT: %T.loc11_14.1 => constants.%i32.builtin
  620. // CHECK:STDOUT:
  621. // CHECK:STDOUT: !definition:
  622. // CHECK:STDOUT: %As.type => constants.%As.type.1ed
  623. // CHECK:STDOUT: %Self.loc11_24.2 => constants.%Self.037
  624. // CHECK:STDOUT: }
  625. // CHECK:STDOUT:
  626. // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%Self.a8c) {
  627. // CHECK:STDOUT: !definition:
  628. // CHECK:STDOUT: %T => constants.%i32.builtin
  629. // CHECK:STDOUT: %As.type => constants.%As.type.1ed
  630. // CHECK:STDOUT: %Self => constants.%Self.a8c
  631. // CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.a02
  632. // CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.98f
  633. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.c44
  634. // CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.43d
  635. // CHECK:STDOUT: }
  636. // CHECK:STDOUT:
  637. // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%As.facet) {
  638. // CHECK:STDOUT: !definition:
  639. // CHECK:STDOUT: %T => constants.%i32.builtin
  640. // CHECK:STDOUT: %As.type => constants.%As.type.1ed
  641. // CHECK:STDOUT: %Self => constants.%As.facet
  642. // CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.204
  643. // CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.24c
  644. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.c44
  645. // CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.43d
  646. // CHECK:STDOUT: }
  647. // CHECK:STDOUT:
  648. // CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%i32.builtin, constants.%As.facet) {
  649. // CHECK:STDOUT: %T => constants.%i32.builtin
  650. // CHECK:STDOUT: %As.type => constants.%As.type.1ed
  651. // CHECK:STDOUT: %Self => constants.%As.facet
  652. // CHECK:STDOUT: %Self.binding.as_type => Core.IntLiteral
  653. // CHECK:STDOUT: %pattern_type.loc12_14 => constants.%pattern_type.dc0
  654. // CHECK:STDOUT: %.loc12_31.1 => constants.%.9cb
  655. // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.956
  656. // CHECK:STDOUT: }
  657. // CHECK:STDOUT:
  658. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) {
  659. // CHECK:STDOUT: %T.loc15_22.1 => constants.%i32.builtin
  660. // CHECK:STDOUT:
  661. // CHECK:STDOUT: !definition:
  662. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.92b
  663. // CHECK:STDOUT: %Self.loc15_32.2 => constants.%Self.597
  664. // CHECK:STDOUT: }
  665. // CHECK:STDOUT:
  666. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%Self.7c0) {
  667. // CHECK:STDOUT: !definition:
  668. // CHECK:STDOUT: %T => constants.%i32.builtin
  669. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.92b
  670. // CHECK:STDOUT: %Self => constants.%Self.7c0
  671. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.d4c
  672. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.086
  673. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.c3f
  674. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.124
  675. // CHECK:STDOUT: }
  676. // CHECK:STDOUT:
  677. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%ImplicitAs.facet.b36) {
  678. // CHECK:STDOUT: !definition:
  679. // CHECK:STDOUT: %T => constants.%i32.builtin
  680. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.92b
  681. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.b36
  682. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.07c
  683. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.a38
  684. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.c3f
  685. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.124
  686. // CHECK:STDOUT: }
  687. // CHECK:STDOUT:
  688. // CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%i32.builtin, constants.%ImplicitAs.facet.b36) {
  689. // CHECK:STDOUT: %T => constants.%i32.builtin
  690. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.92b
  691. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.b36
  692. // CHECK:STDOUT: %Self.binding.as_type => Core.IntLiteral
  693. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.dc0
  694. // CHECK:STDOUT: %.loc16_31.1 => constants.%.9cb
  695. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.956
  696. // CHECK:STDOUT: }
  697. // CHECK:STDOUT:
  698. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  699. // CHECK:STDOUT: %T.loc15_22.1 => Core.IntLiteral
  700. // CHECK:STDOUT:
  701. // CHECK:STDOUT: !definition:
  702. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.79c
  703. // CHECK:STDOUT: %Self.loc15_32.2 => constants.%Self.55f
  704. // CHECK:STDOUT: }
  705. // CHECK:STDOUT:
  706. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%Self.7c0) {
  707. // CHECK:STDOUT: !definition:
  708. // CHECK:STDOUT: %T => Core.IntLiteral
  709. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.79c
  710. // CHECK:STDOUT: %Self => constants.%Self.7c0
  711. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.25a
  712. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.1ae
  713. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.793
  714. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.e18
  715. // CHECK:STDOUT: }
  716. // CHECK:STDOUT:
  717. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%ImplicitAs.facet.c5c) {
  718. // CHECK:STDOUT: !definition:
  719. // CHECK:STDOUT: %T => Core.IntLiteral
  720. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.79c
  721. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.c5c
  722. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.7aa
  723. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.090
  724. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.793
  725. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.e18
  726. // CHECK:STDOUT: }
  727. // CHECK:STDOUT:
  728. // CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(Core.IntLiteral, constants.%ImplicitAs.facet.c5c) {
  729. // CHECK:STDOUT: %T => Core.IntLiteral
  730. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.79c
  731. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.c5c
  732. // CHECK:STDOUT: %Self.binding.as_type => constants.%i32.builtin
  733. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.956
  734. // CHECK:STDOUT: %.loc16_31.1 => constants.%.f7d
  735. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.dc0
  736. // CHECK:STDOUT: }
  737. // CHECK:STDOUT:
  738. // CHECK:STDOUT: --- user.carbon
  739. // CHECK:STDOUT:
  740. // CHECK:STDOUT: constants {
  741. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  742. // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
  743. // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
  744. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  745. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  746. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  747. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  748. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  749. // CHECK:STDOUT: %As.type.223: type = facet_type <@As, @As(%T)> [symbolic]
  750. // CHECK:STDOUT: %Self.2d0: %As.type.223 = symbolic_binding Self, 1 [symbolic]
  751. // CHECK:STDOUT: %As.assoc_type.752: type = assoc_entity_type @As, @As(%T) [symbolic]
  752. // CHECK:STDOUT: %As.WithSelf.Convert.type.bb7: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%T, %Self.2d0) [symbolic]
  753. // CHECK:STDOUT: %As.WithSelf.Convert.923: %As.WithSelf.Convert.type.bb7 = struct_value () [symbolic]
  754. // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
  755. // CHECK:STDOUT: %Self.binding.as_type.297: type = symbolic_binding_type Self, 1, %Self.2d0 [symbolic]
  756. // CHECK:STDOUT: %pattern_type.760: type = pattern_type %Self.binding.as_type.297 [symbolic]
  757. // CHECK:STDOUT: %.184: Core.Form = init_form %T [symbolic]
  758. // CHECK:STDOUT: %As.type.ffe: type = facet_type <@As, @As(%i32.builtin)> [concrete]
  759. // CHECK:STDOUT: %Self.af0: %As.type.ffe = symbolic_binding Self, 1 [symbolic]
  760. // CHECK:STDOUT: %As.WithSelf.Convert.type.06b: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i32.builtin, %Self.2d0) [symbolic]
  761. // CHECK:STDOUT: %As.WithSelf.Convert.b84: %As.WithSelf.Convert.type.06b = struct_value () [symbolic]
  762. // CHECK:STDOUT: %As.assoc_type.bc2: type = assoc_entity_type @As, @As(%i32.builtin) [concrete]
  763. // CHECK:STDOUT: %assoc0.5d8: %As.assoc_type.bc2 = assoc_entity element0, imports.%Core.import_ref.0ec [concrete]
  764. // CHECK:STDOUT: %assoc0.2f9: %As.assoc_type.752 = assoc_entity element0, imports.%Core.import_ref.4c6 [symbolic]
  765. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
  766. // CHECK:STDOUT: %As.facet: %As.type.ffe = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  767. // CHECK:STDOUT: %As.WithSelf.Convert.type.b07: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i32.builtin, %As.facet) [concrete]
  768. // CHECK:STDOUT: %As.WithSelf.Convert.2d0: %As.WithSelf.Convert.type.b07 = struct_value () [concrete]
  769. // CHECK:STDOUT: %.e3a: type = fn_type_with_self_type %As.WithSelf.Convert.type.b07, %As.facet [concrete]
  770. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  771. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  772. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.4b3: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  773. // CHECK:STDOUT: %int_1.f38: %i32.builtin = int_value 1 [concrete]
  774. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  775. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.7b2: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.As.impl.Convert [concrete]
  776. // CHECK:STDOUT: %int_2.5a1: %i32.builtin = int_value 2 [concrete]
  777. // CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete]
  778. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete]
  779. // CHECK:STDOUT: %AddWith.type.6d9: type = facet_type <@AddWith, @AddWith(%T)> [symbolic]
  780. // CHECK:STDOUT: %Self.b7c: %AddWith.type.6d9 = symbolic_binding Self, 1 [symbolic]
  781. // CHECK:STDOUT: %AddWith.assoc_type.b6a: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic]
  782. // CHECK:STDOUT: %AddWith.WithSelf.Op.type.08f: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%T, %Self.b7c) [symbolic]
  783. // CHECK:STDOUT: %AddWith.WithSelf.Op.fb8: %AddWith.WithSelf.Op.type.08f = struct_value () [symbolic]
  784. // CHECK:STDOUT: %Self.binding.as_type.14b: type = symbolic_binding_type Self, 1, %Self.b7c [symbolic]
  785. // CHECK:STDOUT: %pattern_type.259: type = pattern_type %Self.binding.as_type.14b [symbolic]
  786. // CHECK:STDOUT: %.730: Core.Form = init_form %Self.binding.as_type.14b [symbolic]
  787. // CHECK:STDOUT: %AddWith.type.46d: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete]
  788. // CHECK:STDOUT: %Self.365: %AddWith.type.46d = symbolic_binding Self, 1 [symbolic]
  789. // CHECK:STDOUT: %AddWith.WithSelf.Op.type.de8: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%i32.builtin, %Self.b7c) [symbolic]
  790. // CHECK:STDOUT: %AddWith.WithSelf.Op.31e: %AddWith.WithSelf.Op.type.de8 = struct_value () [symbolic]
  791. // CHECK:STDOUT: %AddWith.assoc_type.dff: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete]
  792. // CHECK:STDOUT: %assoc0.6d5: %AddWith.assoc_type.dff = assoc_entity element0, imports.%Core.import_ref.1b1 [concrete]
  793. // CHECK:STDOUT: %assoc0.20f: %AddWith.assoc_type.b6a = assoc_entity element0, imports.%Core.import_ref.a84 [symbolic]
  794. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness imports.%AddWith.impl_witness_table [concrete]
  795. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.46d = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete]
  796. // CHECK:STDOUT: %AddWith.WithSelf.Op.type.78e: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%i32.builtin, %AddWith.facet) [concrete]
  797. // CHECK:STDOUT: %AddWith.WithSelf.Op.d4d: %AddWith.WithSelf.Op.type.78e = struct_value () [concrete]
  798. // CHECK:STDOUT: %.0ff: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.78e, %AddWith.facet [concrete]
  799. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.type: type = fn_type @i32.builtin.as.AddWith.impl.Op [concrete]
  800. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op: %i32.builtin.as.AddWith.impl.Op.type = struct_value () [concrete]
  801. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.bound.abd: <bound method> = bound_method %int_1.f38, %i32.builtin.as.AddWith.impl.Op [concrete]
  802. // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete]
  803. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  804. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  805. // CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
  806. // CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic]
  807. // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic]
  808. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%T, %Self.738) [symbolic]
  809. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic]
  810. // CHECK:STDOUT: %Self.binding.as_type.a44: type = symbolic_binding_type Self, 1, %Self.738 [symbolic]
  811. // CHECK:STDOUT: %pattern_type.e9a: type = pattern_type %Self.binding.as_type.a44 [symbolic]
  812. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  813. // CHECK:STDOUT: %Self.cce: %ImplicitAs.type.139 = symbolic_binding Self, 1 [symbolic]
  814. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.577: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(Core.IntLiteral, %Self.738) [symbolic]
  815. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.f0a: %ImplicitAs.WithSelf.Convert.type.577 = struct_value () [symbolic]
  816. // CHECK:STDOUT: %ImplicitAs.assoc_type.959: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete]
  817. // CHECK:STDOUT: %assoc0.461: %ImplicitAs.assoc_type.959 = assoc_entity element0, imports.%Core.import_ref.201 [concrete]
  818. // CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic]
  819. // CHECK:STDOUT: %ImplicitAs.type.78a: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
  820. // CHECK:STDOUT: %Self.dd8: %ImplicitAs.type.78a = symbolic_binding Self, 1 [symbolic]
  821. // CHECK:STDOUT: %ImplicitAs.impl_witness.304: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.267 [concrete]
  822. // CHECK:STDOUT: %ImplicitAs.facet.7f3: %ImplicitAs.type.139 = facet_value %i32.builtin, (%ImplicitAs.impl_witness.304) [concrete]
  823. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e78: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(Core.IntLiteral, %ImplicitAs.facet.7f3) [concrete]
  824. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.e56: %ImplicitAs.WithSelf.Convert.type.e78 = struct_value () [concrete]
  825. // CHECK:STDOUT: %.626: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e78, %ImplicitAs.facet.7f3 [concrete]
  826. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.builtin.as.ImplicitAs.impl.Convert [concrete]
  827. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert: %i32.builtin.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  828. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_3.a0f, %i32.builtin.as.ImplicitAs.impl.Convert [concrete]
  829. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  830. // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32.builtin [concrete]
  831. // CHECK:STDOUT: %pattern_type.9e2: type = pattern_type %array_type [concrete]
  832. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  833. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.2b2: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.As.impl.Convert [concrete]
  834. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.2d0: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.As.impl.Convert [concrete]
  835. // CHECK:STDOUT: %int_4.4f1: %i32.builtin = int_value 4 [concrete]
  836. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.bound.bf8: <bound method> = bound_method %int_3.a0f, %i32.builtin.as.AddWith.impl.Op [concrete]
  837. // CHECK:STDOUT: %int_7: %i32.builtin = int_value 7 [concrete]
  838. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [concrete]
  839. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_3.1ba, %int_4.0c1, %int_7) [concrete]
  840. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  841. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.ea9: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32.builtin, %Self.738) [symbolic]
  842. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.149: %ImplicitAs.WithSelf.Convert.type.ea9 = struct_value () [symbolic]
  843. // CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete]
  844. // CHECK:STDOUT: %assoc0.4a0: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.201 [concrete]
  845. // CHECK:STDOUT: %ImplicitAs.impl_witness.586: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.7a2 [concrete]
  846. // CHECK:STDOUT: %ImplicitAs.facet.fa4: %ImplicitAs.type.78a = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.586) [concrete]
  847. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.66f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32.builtin, %ImplicitAs.facet.fa4) [concrete]
  848. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.e20: %ImplicitAs.WithSelf.Convert.type.66f = struct_value () [concrete]
  849. // CHECK:STDOUT: %.714: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.66f, %ImplicitAs.facet.fa4 [concrete]
  850. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  851. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  852. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.a95: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  853. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762: <bound method> = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  854. // CHECK:STDOUT: %array: %array_type = tuple_value (%int_3.a0f, %int_4.4f1, %int_7) [concrete]
  855. // CHECK:STDOUT: }
  856. // CHECK:STDOUT:
  857. // CHECK:STDOUT: imports {
  858. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  859. // CHECK:STDOUT: .Int = %Core.Int
  860. // CHECK:STDOUT: .As = %Core.As
  861. // CHECK:STDOUT: .AddWith = %Core.AddWith
  862. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  863. // CHECK:STDOUT: import Core//default
  864. // CHECK:STDOUT: }
  865. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int]
  866. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic]
  867. // CHECK:STDOUT: %Core.import_ref.8db: @As.WithSelf.%As.assoc_type (%As.assoc_type.752) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.WithSelf.%assoc0 (constants.%assoc0.2f9)]
  868. // CHECK:STDOUT: %Core.Convert.b81 = import_ref Core//default, Convert, unloaded
  869. // CHECK:STDOUT: %Core.import_ref.0ec: @As.WithSelf.%As.WithSelf.Convert.type (%As.WithSelf.Convert.type.bb7) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.WithSelf.%As.WithSelf.Convert (constants.%As.WithSelf.Convert.923)]
  870. // CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%T (constants.%T)]
  871. // CHECK:STDOUT: %Core.import_ref.1ac891.2: @As.%As.type (%As.type.223) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%Self (constants.%Self.2d0)]
  872. // CHECK:STDOUT: %Core.import_ref.0e7 = import_ref Core//default, loc{{\d+_\d+}}, unloaded
  873. // CHECK:STDOUT: %Core.import_ref.b3bc94.3: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%T (constants.%T)]
  874. // CHECK:STDOUT: %Core.import_ref.4c6 = import_ref Core//default, loc{{\d+_\d+}}, unloaded
  875. // CHECK:STDOUT: %Core.import_ref.ad5: <witness> = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%As.impl_witness]
  876. // CHECK:STDOUT: %Core.import_ref.a86459.1: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = Core.IntLiteral]
  877. // CHECK:STDOUT: %Core.import_ref.412: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%As.type.ffe]
  878. // CHECK:STDOUT: %Core.import_ref.d9d: %Core.IntLiteral.as.As.impl.Convert.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  879. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.d9d), @Core.IntLiteral.as.As.impl [concrete]
  880. // CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//default, AddWith, loaded [concrete = constants.%AddWith.generic]
  881. // CHECK:STDOUT: %Core.import_ref.3f3: @AddWith.WithSelf.%AddWith.assoc_type (%AddWith.assoc_type.b6a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.WithSelf.%assoc0 (constants.%assoc0.20f)]
  882. // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded
  883. // CHECK:STDOUT: %Core.import_ref.1b1: @AddWith.WithSelf.%AddWith.WithSelf.Op.type (%AddWith.WithSelf.Op.type.08f) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.WithSelf.%AddWith.WithSelf.Op (constants.%AddWith.WithSelf.Op.fb8)]
  884. // CHECK:STDOUT: %Core.import_ref.b3bc94.5: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%T (constants.%T)]
  885. // CHECK:STDOUT: %Core.import_ref.c10145.2: @AddWith.%AddWith.type (%AddWith.type.6d9) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%Self (constants.%Self.b7c)]
  886. // CHECK:STDOUT: %Core.import_ref.a40 = import_ref Core//default, loc{{\d+_\d+}}, unloaded
  887. // CHECK:STDOUT: %Core.import_ref.b3bc94.6: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%T (constants.%T)]
  888. // CHECK:STDOUT: %Core.import_ref.a84 = import_ref Core//default, loc{{\d+_\d+}}, unloaded
  889. // CHECK:STDOUT: %Core.import_ref.bf0: <witness> = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%AddWith.impl_witness]
  890. // CHECK:STDOUT: %Core.import_ref.63cbb1.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin]
  891. // CHECK:STDOUT: %Core.import_ref.a41: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%AddWith.type.46d]
  892. // CHECK:STDOUT: %Core.import_ref.b8a: %i32.builtin.as.AddWith.impl.Op.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin.as.AddWith.impl.Op]
  893. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.b8a), @i32.builtin.as.AddWith.impl [concrete]
  894. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  895. // CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.WithSelf.%assoc0 (constants.%assoc0.843)]
  896. // CHECK:STDOUT: %Core.Convert.2a3 = import_ref Core//default, Convert, unloaded
  897. // CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)]
  898. // CHECK:STDOUT: %Core.import_ref.b3bc94.8: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
  899. // CHECK:STDOUT: %Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self (constants.%Self.738)]
  900. // CHECK:STDOUT: %Core.import_ref.9ec = import_ref Core//default, loc{{\d+_\d+}}, unloaded
  901. // CHECK:STDOUT: %Core.import_ref.b3bc94.9: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
  902. // CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//default, loc{{\d+_\d+}}, unloaded
  903. // CHECK:STDOUT: %Core.import_ref.d1a: <witness> = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.impl_witness.586]
  904. // CHECK:STDOUT: %Core.import_ref.a86459.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = Core.IntLiteral]
  905. // CHECK:STDOUT: %Core.import_ref.7e7: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.type.78a]
  906. // CHECK:STDOUT: %Core.import_ref.8be: <witness> = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.impl_witness.304]
  907. // CHECK:STDOUT: %Core.import_ref.63cbb1.3: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin]
  908. // CHECK:STDOUT: %Core.import_ref.79b: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.type.139]
  909. // CHECK:STDOUT: %Core.import_ref.954: %i32.builtin.as.ImplicitAs.impl.Convert.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert]
  910. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.267 = impl_witness_table (%Core.import_ref.954), @i32.builtin.as.ImplicitAs.impl [concrete]
  911. // CHECK:STDOUT: %Core.import_ref.d85: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  912. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.7a2 = impl_witness_table (%Core.import_ref.d85), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  913. // CHECK:STDOUT: }
  914. // CHECK:STDOUT:
  915. // CHECK:STDOUT: file {
  916. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  917. // CHECK:STDOUT: .Core = imports.%Core
  918. // CHECK:STDOUT: .arr = %arr
  919. // CHECK:STDOUT: }
  920. // CHECK:STDOUT: %Core.import = import Core
  921. // CHECK:STDOUT: name_binding_decl {
  922. // CHECK:STDOUT: %arr.patt: %pattern_type.9e2 = ref_binding_pattern arr [concrete]
  923. // CHECK:STDOUT: %arr.var_patt: %pattern_type.9e2 = var_pattern %arr.patt [concrete]
  924. // CHECK:STDOUT: }
  925. // CHECK:STDOUT: %arr.var: ref %array_type = var %arr.var_patt [concrete]
  926. // CHECK:STDOUT: %.loc4_44: type = splice_block %array_type [concrete = constants.%array_type] {
  927. // CHECK:STDOUT: %.loc4_16: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  928. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  929. // CHECK:STDOUT: %.loc4_27: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  930. // CHECK:STDOUT: %impl.elem0.loc4_24: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  931. // CHECK:STDOUT: %bound_method.loc4_24: <bound method> = bound_method %int_1, %impl.elem0.loc4_24 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.4b3]
  932. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_24: init %i32.builtin = call %bound_method.loc4_24(%int_1) [concrete = constants.%int_1.f38]
  933. // CHECK:STDOUT: %.loc4_24.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_24 [concrete = constants.%int_1.f38]
  934. // CHECK:STDOUT: %.loc4_24.2: %i32.builtin = converted %int_1, %.loc4_24.1 [concrete = constants.%int_1.f38]
  935. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  936. // CHECK:STDOUT: %.loc4_40: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  937. // CHECK:STDOUT: %impl.elem0.loc4_37: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  938. // CHECK:STDOUT: %bound_method.loc4_37: <bound method> = bound_method %int_2, %impl.elem0.loc4_37 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.7b2]
  939. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_37: init %i32.builtin = call %bound_method.loc4_37(%int_2) [concrete = constants.%int_2.5a1]
  940. // CHECK:STDOUT: %.loc4_37.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_37 [concrete = constants.%int_2.5a1]
  941. // CHECK:STDOUT: %.loc4_37.2: %i32.builtin = converted %int_2, %.loc4_37.1 [concrete = constants.%int_2.5a1]
  942. // CHECK:STDOUT: %impl.elem0.loc4_32.1: %.0ff = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%i32.builtin.as.AddWith.impl.Op]
  943. // CHECK:STDOUT: %bound_method.loc4_32.1: <bound method> = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%i32.builtin.as.AddWith.impl.Op.bound.abd]
  944. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.call: init %i32.builtin = call %bound_method.loc4_32.1(%.loc4_24.2, %.loc4_37.2) [concrete = constants.%int_3.a0f]
  945. // CHECK:STDOUT: %impl.elem0.loc4_32.2: %.626 = impl_witness_access constants.%ImplicitAs.impl_witness.304, element0 [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert]
  946. // CHECK:STDOUT: %bound_method.loc4_32.2: <bound method> = bound_method %i32.builtin.as.AddWith.impl.Op.call, %impl.elem0.loc4_32.2 [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert.bound]
  947. // CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %i32.builtin.as.AddWith.impl.Op.call [concrete = constants.%int_3.a0f]
  948. // CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %i32.builtin.as.AddWith.impl.Op.call, %.loc4_32.1 [concrete = constants.%int_3.a0f]
  949. // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc4_32.2(%.loc4_32.2) [concrete = constants.%int_3.1ba]
  950. // CHECK:STDOUT: %.loc4_32.3: Core.IntLiteral = value_of_initializer %i32.builtin.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.1ba]
  951. // CHECK:STDOUT: %.loc4_32.4: Core.IntLiteral = converted %i32.builtin.as.AddWith.impl.Op.call, %.loc4_32.3 [concrete = constants.%int_3.1ba]
  952. // CHECK:STDOUT: %array_type: type = array_type %.loc4_32.4, %.loc4_16 [concrete = constants.%array_type]
  953. // CHECK:STDOUT: }
  954. // CHECK:STDOUT: %arr: ref %array_type = ref_binding arr, %arr.var [concrete = %arr.var]
  955. // CHECK:STDOUT: }
  956. // CHECK:STDOUT:
  957. // CHECK:STDOUT: generic interface @As(imports.%Core.import_ref.b3bc94.3: type) [from "core.carbon"] {
  958. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  959. // CHECK:STDOUT:
  960. // CHECK:STDOUT: !definition:
  961. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.223)]
  962. // CHECK:STDOUT: %Self: @As.%As.type (%As.type.223) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.2d0)]
  963. // CHECK:STDOUT:
  964. // CHECK:STDOUT: interface {
  965. // CHECK:STDOUT: !members:
  966. // CHECK:STDOUT: .Self = imports.%Core.import_ref.0e7
  967. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.8db
  968. // CHECK:STDOUT: witness = (imports.%Core.Convert.b81)
  969. // CHECK:STDOUT:
  970. // CHECK:STDOUT: !requires:
  971. // CHECK:STDOUT: }
  972. // CHECK:STDOUT: }
  973. // CHECK:STDOUT:
  974. // CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.b3bc94.6: type) [from "core.carbon"] {
  975. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  976. // CHECK:STDOUT:
  977. // CHECK:STDOUT: !definition:
  978. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d9)]
  979. // CHECK:STDOUT: %Self: @AddWith.%AddWith.type (%AddWith.type.6d9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.b7c)]
  980. // CHECK:STDOUT:
  981. // CHECK:STDOUT: interface {
  982. // CHECK:STDOUT: !members:
  983. // CHECK:STDOUT: .Self = imports.%Core.import_ref.a40
  984. // CHECK:STDOUT: .Op = imports.%Core.import_ref.3f3
  985. // CHECK:STDOUT: witness = (imports.%Core.Op)
  986. // CHECK:STDOUT:
  987. // CHECK:STDOUT: !requires:
  988. // CHECK:STDOUT: }
  989. // CHECK:STDOUT: }
  990. // CHECK:STDOUT:
  991. // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.9: type) [from "core.carbon"] {
  992. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  993. // CHECK:STDOUT:
  994. // CHECK:STDOUT: !definition:
  995. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)]
  996. // CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)]
  997. // CHECK:STDOUT:
  998. // CHECK:STDOUT: interface {
  999. // CHECK:STDOUT: !members:
  1000. // CHECK:STDOUT: .Self = imports.%Core.import_ref.9ec
  1001. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.178
  1002. // CHECK:STDOUT: witness = (imports.%Core.Convert.2a3)
  1003. // CHECK:STDOUT:
  1004. // CHECK:STDOUT: !requires:
  1005. // CHECK:STDOUT: }
  1006. // CHECK:STDOUT: }
  1007. // CHECK:STDOUT:
  1008. // CHECK:STDOUT: impl @Core.IntLiteral.as.As.impl: imports.%Core.import_ref.a86459.1 as imports.%Core.import_ref.412 [from "core.carbon"] {
  1009. // CHECK:STDOUT: !members:
  1010. // CHECK:STDOUT: witness = imports.%Core.import_ref.ad5
  1011. // CHECK:STDOUT: }
  1012. // CHECK:STDOUT:
  1013. // CHECK:STDOUT: impl @i32.builtin.as.AddWith.impl: imports.%Core.import_ref.63cbb1.2 as imports.%Core.import_ref.a41 [from "core.carbon"] {
  1014. // CHECK:STDOUT: !members:
  1015. // CHECK:STDOUT: witness = imports.%Core.import_ref.bf0
  1016. // CHECK:STDOUT: }
  1017. // CHECK:STDOUT:
  1018. // CHECK:STDOUT: impl @Core.IntLiteral.as.ImplicitAs.impl: imports.%Core.import_ref.a86459.2 as imports.%Core.import_ref.7e7 [from "core.carbon"] {
  1019. // CHECK:STDOUT: !members:
  1020. // CHECK:STDOUT: witness = imports.%Core.import_ref.d1a
  1021. // CHECK:STDOUT: }
  1022. // CHECK:STDOUT:
  1023. // CHECK:STDOUT: impl @i32.builtin.as.ImplicitAs.impl: imports.%Core.import_ref.63cbb1.3 as imports.%Core.import_ref.79b [from "core.carbon"] {
  1024. // CHECK:STDOUT: !members:
  1025. // CHECK:STDOUT: witness = imports.%Core.import_ref.8be
  1026. // CHECK:STDOUT: }
  1027. // CHECK:STDOUT:
  1028. // CHECK:STDOUT: fn @Int = "int.make_type_signed" [from "core.carbon"];
  1029. // CHECK:STDOUT:
  1030. // CHECK:STDOUT: generic fn @As.WithSelf.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.1ac891.2: @As.%As.type (%As.type.223)) [from "core.carbon"] {
  1031. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1032. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.223)]
  1033. // CHECK:STDOUT: %Self: @As.WithSelf.Convert.%As.type (%As.type.223) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.2d0)]
  1034. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.297)]
  1035. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.760)]
  1036. // CHECK:STDOUT: %.1: Core.Form = init_form %T [symbolic = %.1 (constants.%.184)]
  1037. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.51d)]
  1038. // CHECK:STDOUT:
  1039. // CHECK:STDOUT: fn;
  1040. // CHECK:STDOUT: }
  1041. // CHECK:STDOUT:
  1042. // CHECK:STDOUT: fn @Core.IntLiteral.as.As.impl.Convert = "int.convert_checked" [from "core.carbon"];
  1043. // CHECK:STDOUT:
  1044. // CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(imports.%Core.import_ref.b3bc94.5: type, imports.%Core.import_ref.c10145.2: @AddWith.%AddWith.type (%AddWith.type.6d9)) [from "core.carbon"] {
  1045. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1046. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d9)]
  1047. // CHECK:STDOUT: %Self: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.6d9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.b7c)]
  1048. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.14b)]
  1049. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.259)]
  1050. // CHECK:STDOUT: %.1: Core.Form = init_form %Self.binding.as_type [symbolic = %.1 (constants.%.730)]
  1051. // CHECK:STDOUT:
  1052. // CHECK:STDOUT: fn;
  1053. // CHECK:STDOUT: }
  1054. // CHECK:STDOUT:
  1055. // CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op = "int.sadd" [from "core.carbon"];
  1056. // CHECK:STDOUT:
  1057. // CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(imports.%Core.import_ref.b3bc94.8: type, imports.%Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031)) [from "core.carbon"] {
  1058. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1059. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)]
  1060. // CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)]
  1061. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.a44)]
  1062. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.e9a)]
  1063. // CHECK:STDOUT: %.1: Core.Form = init_form %T [symbolic = %.1 (constants.%.184)]
  1064. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.51d)]
  1065. // CHECK:STDOUT:
  1066. // CHECK:STDOUT: fn;
  1067. // CHECK:STDOUT: }
  1068. // CHECK:STDOUT:
  1069. // CHECK:STDOUT: fn @i32.builtin.as.ImplicitAs.impl.Convert = "int.convert_checked" [from "core.carbon"];
  1070. // CHECK:STDOUT:
  1071. // CHECK:STDOUT: fn @Core.IntLiteral.as.ImplicitAs.impl.Convert = "int.convert_checked" [from "core.carbon"];
  1072. // CHECK:STDOUT:
  1073. // CHECK:STDOUT: fn @__global_init() {
  1074. // CHECK:STDOUT: !entry:
  1075. // CHECK:STDOUT: %int_3.loc4_49: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  1076. // CHECK:STDOUT: %int_4.loc4_52: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  1077. // CHECK:STDOUT: %int_3.loc4_56: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  1078. // CHECK:STDOUT: %.loc4_61: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  1079. // CHECK:STDOUT: %impl.elem0.loc4_58: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  1080. // CHECK:STDOUT: %bound_method.loc4_58: <bound method> = bound_method %int_3.loc4_56, %impl.elem0.loc4_58 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.2b2]
  1081. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_58: init %i32.builtin = call %bound_method.loc4_58(%int_3.loc4_56) [concrete = constants.%int_3.a0f]
  1082. // CHECK:STDOUT: %.loc4_58.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_58 [concrete = constants.%int_3.a0f]
  1083. // CHECK:STDOUT: %.loc4_58.2: %i32.builtin = converted %int_3.loc4_56, %.loc4_58.1 [concrete = constants.%int_3.a0f]
  1084. // CHECK:STDOUT: %int_4.loc4_69: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  1085. // CHECK:STDOUT: %.loc4_74: type = type_literal constants.%i32.builtin [concrete = constants.%i32.builtin]
  1086. // CHECK:STDOUT: %impl.elem0.loc4_71: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  1087. // CHECK:STDOUT: %bound_method.loc4_71: <bound method> = bound_method %int_4.loc4_69, %impl.elem0.loc4_71 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.2d0]
  1088. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_71: init %i32.builtin = call %bound_method.loc4_71(%int_4.loc4_69) [concrete = constants.%int_4.4f1]
  1089. // CHECK:STDOUT: %.loc4_71.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_71 [concrete = constants.%int_4.4f1]
  1090. // CHECK:STDOUT: %.loc4_71.2: %i32.builtin = converted %int_4.loc4_69, %.loc4_71.1 [concrete = constants.%int_4.4f1]
  1091. // CHECK:STDOUT: %impl.elem0.loc4_66: %.0ff = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%i32.builtin.as.AddWith.impl.Op]
  1092. // CHECK:STDOUT: %bound_method.loc4_66: <bound method> = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%i32.builtin.as.AddWith.impl.Op.bound.bf8]
  1093. // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.call: init %i32.builtin = call %bound_method.loc4_66(%.loc4_58.2, %.loc4_71.2) [concrete = constants.%int_7]
  1094. // CHECK:STDOUT: %.loc4_78.1: %tuple.type = tuple_literal (%int_3.loc4_49, %int_4.loc4_52, %i32.builtin.as.AddWith.impl.Op.call) [concrete = constants.%tuple]
  1095. // CHECK:STDOUT: %impl.elem0.loc4_78.1: %.714 = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1096. // CHECK:STDOUT: %bound_method.loc4_78.1: <bound method> = bound_method %int_3.loc4_49, %impl.elem0.loc4_78.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.a95]
  1097. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.1: init %i32.builtin = call %bound_method.loc4_78.1(%int_3.loc4_49) [concrete = constants.%int_3.a0f]
  1098. // CHECK:STDOUT: %.loc4_78.2: init %i32.builtin = converted %int_3.loc4_49, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.1 [concrete = constants.%int_3.a0f]
  1099. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  1100. // CHECK:STDOUT: %.loc4_78.3: ref %i32.builtin = array_index file.%arr.var, %int_0
  1101. // CHECK:STDOUT: %.loc4_78.4: init %i32.builtin to %.loc4_78.3 = in_place_init %.loc4_78.2 [concrete = constants.%int_3.a0f]
  1102. // CHECK:STDOUT: %impl.elem0.loc4_78.2: %.714 = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1103. // CHECK:STDOUT: %bound_method.loc4_78.2: <bound method> = bound_method %int_4.loc4_52, %impl.elem0.loc4_78.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762]
  1104. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.2: init %i32.builtin = call %bound_method.loc4_78.2(%int_4.loc4_52) [concrete = constants.%int_4.4f1]
  1105. // CHECK:STDOUT: %.loc4_78.5: init %i32.builtin = converted %int_4.loc4_52, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.2 [concrete = constants.%int_4.4f1]
  1106. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1107. // CHECK:STDOUT: %.loc4_78.6: ref %i32.builtin = array_index file.%arr.var, %int_1
  1108. // CHECK:STDOUT: %.loc4_78.7: init %i32.builtin to %.loc4_78.6 = in_place_init %.loc4_78.5 [concrete = constants.%int_4.4f1]
  1109. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1110. // CHECK:STDOUT: %.loc4_78.8: ref %i32.builtin = array_index file.%arr.var, %int_2
  1111. // CHECK:STDOUT: %.loc4_78.9: init %i32.builtin to %.loc4_78.8 = in_place_init %i32.builtin.as.AddWith.impl.Op.call [concrete = constants.%int_7]
  1112. // CHECK:STDOUT: %.loc4_78.10: init %array_type to file.%arr.var = array_init (%.loc4_78.4, %.loc4_78.7, %.loc4_78.9) [concrete = constants.%array]
  1113. // CHECK:STDOUT: %.loc4_1: init %array_type = converted %.loc4_78.1, %.loc4_78.10 [concrete = constants.%array]
  1114. // CHECK:STDOUT: assign file.%arr.var, %.loc4_1
  1115. // CHECK:STDOUT: return
  1116. // CHECK:STDOUT: }
  1117. // CHECK:STDOUT:
  1118. // CHECK:STDOUT: specific @As(constants.%T) {
  1119. // CHECK:STDOUT: %T => constants.%T
  1120. // CHECK:STDOUT: }
  1121. // CHECK:STDOUT:
  1122. // CHECK:STDOUT: specific @As.WithSelf(constants.%T, constants.%Self.2d0) {}
  1123. // CHECK:STDOUT:
  1124. // CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%T, constants.%Self.2d0) {
  1125. // CHECK:STDOUT: %T => constants.%T
  1126. // CHECK:STDOUT: %As.type => constants.%As.type.223
  1127. // CHECK:STDOUT: %Self => constants.%Self.2d0
  1128. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.297
  1129. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.760
  1130. // CHECK:STDOUT: %.1 => constants.%.184
  1131. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.51d
  1132. // CHECK:STDOUT: }
  1133. // CHECK:STDOUT:
  1134. // CHECK:STDOUT: specific @As(constants.%i32.builtin) {
  1135. // CHECK:STDOUT: %T => constants.%i32.builtin
  1136. // CHECK:STDOUT:
  1137. // CHECK:STDOUT: !definition:
  1138. // CHECK:STDOUT: %As.type => constants.%As.type.ffe
  1139. // CHECK:STDOUT: %Self => constants.%Self.af0
  1140. // CHECK:STDOUT: }
  1141. // CHECK:STDOUT:
  1142. // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%Self.2d0) {
  1143. // CHECK:STDOUT: !definition:
  1144. // CHECK:STDOUT: %T => constants.%i32.builtin
  1145. // CHECK:STDOUT: %As.type => constants.%As.type.ffe
  1146. // CHECK:STDOUT: %Self => constants.%Self.2d0
  1147. // CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.06b
  1148. // CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.b84
  1149. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.bc2
  1150. // CHECK:STDOUT: %assoc0 => constants.%assoc0.5d8
  1151. // CHECK:STDOUT: }
  1152. // CHECK:STDOUT:
  1153. // CHECK:STDOUT: specific @As.WithSelf(constants.%i32.builtin, constants.%As.facet) {
  1154. // CHECK:STDOUT: !definition:
  1155. // CHECK:STDOUT: %T => constants.%i32.builtin
  1156. // CHECK:STDOUT: %As.type => constants.%As.type.ffe
  1157. // CHECK:STDOUT: %Self => constants.%As.facet
  1158. // CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.b07
  1159. // CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.2d0
  1160. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.bc2
  1161. // CHECK:STDOUT: %assoc0 => constants.%assoc0.5d8
  1162. // CHECK:STDOUT: }
  1163. // CHECK:STDOUT:
  1164. // CHECK:STDOUT: specific @AddWith(constants.%T) {
  1165. // CHECK:STDOUT: %T => constants.%T
  1166. // CHECK:STDOUT: }
  1167. // CHECK:STDOUT:
  1168. // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%T, constants.%Self.b7c) {}
  1169. // CHECK:STDOUT:
  1170. // CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%T, constants.%Self.b7c) {
  1171. // CHECK:STDOUT: %T => constants.%T
  1172. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6d9
  1173. // CHECK:STDOUT: %Self => constants.%Self.b7c
  1174. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.14b
  1175. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.259
  1176. // CHECK:STDOUT: %.1 => constants.%.730
  1177. // CHECK:STDOUT: }
  1178. // CHECK:STDOUT:
  1179. // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) {
  1180. // CHECK:STDOUT: %T => constants.%i32.builtin
  1181. // CHECK:STDOUT:
  1182. // CHECK:STDOUT: !definition:
  1183. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.46d
  1184. // CHECK:STDOUT: %Self => constants.%Self.365
  1185. // CHECK:STDOUT: }
  1186. // CHECK:STDOUT:
  1187. // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%Self.b7c) {
  1188. // CHECK:STDOUT: !definition:
  1189. // CHECK:STDOUT: %T => constants.%i32.builtin
  1190. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.46d
  1191. // CHECK:STDOUT: %Self => constants.%Self.b7c
  1192. // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.de8
  1193. // CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.31e
  1194. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff
  1195. // CHECK:STDOUT: %assoc0 => constants.%assoc0.6d5
  1196. // CHECK:STDOUT: }
  1197. // CHECK:STDOUT:
  1198. // CHECK:STDOUT: specific @AddWith.WithSelf(constants.%i32.builtin, constants.%AddWith.facet) {
  1199. // CHECK:STDOUT: !definition:
  1200. // CHECK:STDOUT: %T => constants.%i32.builtin
  1201. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.46d
  1202. // CHECK:STDOUT: %Self => constants.%AddWith.facet
  1203. // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.78e
  1204. // CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.d4d
  1205. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff
  1206. // CHECK:STDOUT: %assoc0 => constants.%assoc0.6d5
  1207. // CHECK:STDOUT: }
  1208. // CHECK:STDOUT:
  1209. // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
  1210. // CHECK:STDOUT: %T => constants.%T
  1211. // CHECK:STDOUT: }
  1212. // CHECK:STDOUT:
  1213. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%T, constants.%Self.738) {}
  1214. // CHECK:STDOUT:
  1215. // CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%T, constants.%Self.738) {
  1216. // CHECK:STDOUT: %T => constants.%T
  1217. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.031
  1218. // CHECK:STDOUT: %Self => constants.%Self.738
  1219. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.a44
  1220. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.e9a
  1221. // CHECK:STDOUT: %.1 => constants.%.184
  1222. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.51d
  1223. // CHECK:STDOUT: }
  1224. // CHECK:STDOUT:
  1225. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  1226. // CHECK:STDOUT: %T => Core.IntLiteral
  1227. // CHECK:STDOUT:
  1228. // CHECK:STDOUT: !definition:
  1229. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.139
  1230. // CHECK:STDOUT: %Self => constants.%Self.cce
  1231. // CHECK:STDOUT: }
  1232. // CHECK:STDOUT:
  1233. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%Self.738) {
  1234. // CHECK:STDOUT: !definition:
  1235. // CHECK:STDOUT: %T => Core.IntLiteral
  1236. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.139
  1237. // CHECK:STDOUT: %Self => constants.%Self.738
  1238. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.577
  1239. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.f0a
  1240. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.959
  1241. // CHECK:STDOUT: %assoc0 => constants.%assoc0.461
  1242. // CHECK:STDOUT: }
  1243. // CHECK:STDOUT:
  1244. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) {
  1245. // CHECK:STDOUT: %T => constants.%i32.builtin
  1246. // CHECK:STDOUT:
  1247. // CHECK:STDOUT: !definition:
  1248. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.78a
  1249. // CHECK:STDOUT: %Self => constants.%Self.dd8
  1250. // CHECK:STDOUT: }
  1251. // CHECK:STDOUT:
  1252. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(Core.IntLiteral, constants.%ImplicitAs.facet.7f3) {
  1253. // CHECK:STDOUT: !definition:
  1254. // CHECK:STDOUT: %T => Core.IntLiteral
  1255. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.139
  1256. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.7f3
  1257. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.e78
  1258. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.e56
  1259. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.959
  1260. // CHECK:STDOUT: %assoc0 => constants.%assoc0.461
  1261. // CHECK:STDOUT: }
  1262. // CHECK:STDOUT:
  1263. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%Self.738) {
  1264. // CHECK:STDOUT: !definition:
  1265. // CHECK:STDOUT: %T => constants.%i32.builtin
  1266. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.78a
  1267. // CHECK:STDOUT: %Self => constants.%Self.738
  1268. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.ea9
  1269. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.149
  1270. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.398
  1271. // CHECK:STDOUT: %assoc0 => constants.%assoc0.4a0
  1272. // CHECK:STDOUT: }
  1273. // CHECK:STDOUT:
  1274. // CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%i32.builtin, constants.%ImplicitAs.facet.fa4) {
  1275. // CHECK:STDOUT: !definition:
  1276. // CHECK:STDOUT: %T => constants.%i32.builtin
  1277. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.78a
  1278. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.fa4
  1279. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.66f
  1280. // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.e20
  1281. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.398
  1282. // CHECK:STDOUT: %assoc0 => constants.%assoc0.4a0
  1283. // CHECK:STDOUT: }
  1284. // CHECK:STDOUT: