call_from_operator.carbon 105 KB

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