generic.carbon 112 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724
  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/convert.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/impl/lookup/generic.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/generic.carbon
  14. // --- deduced_type.carbon
  15. library "[[@TEST_NAME]]";
  16. interface HasF {
  17. fn F[self: Self]();
  18. }
  19. impl forall [T:! type] T as HasF {
  20. fn F[unused self: Self]() {}
  21. }
  22. fn G(x: {}) {
  23. x.(HasF.F)();
  24. }
  25. // --- deduced_type_subst.carbon
  26. library "[[@TEST_NAME]]";
  27. interface HasF {
  28. fn F[self: Self]() -> Self;
  29. }
  30. impl forall [T:! type] T* as HasF {
  31. fn F[self: Self]() -> T* { return self; }
  32. }
  33. fn G(x: {}*) -> {}* {
  34. return x.(HasF.F)();
  35. }
  36. // --- deduced_type_argument.carbon
  37. library "[[@TEST_NAME]]";
  38. interface HasF {
  39. fn F[self: Self]();
  40. }
  41. class C(T:! type) {}
  42. impl forall [T:! type] C(T) as HasF {
  43. fn F[unused self: Self]() {}
  44. }
  45. fn G(x: C({})) {
  46. x.(HasF.F)();
  47. }
  48. // --- deduced_interface_argument.carbon
  49. library "[[@TEST_NAME]]";
  50. interface HasF(T:! type) {
  51. fn F[self: Self]();
  52. }
  53. impl forall [T:! type] {} as HasF(T) {
  54. fn F[unused self: Self]() {}
  55. }
  56. fn G(x: {}) {
  57. x.(HasF({}).F)();
  58. }
  59. // --- fail_incomplete_deduction.carbon
  60. library "[[@TEST_NAME]]";
  61. interface HasF {
  62. fn F[self: Self]();
  63. }
  64. // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding]
  65. // CHECK:STDERR: impl forall [T:! type, U:! type] T as HasF {
  66. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  67. // CHECK:STDERR:
  68. impl forall [T:! type, U:! type] T as HasF {
  69. fn F[unused self: Self]() {}
  70. }
  71. fn G(x: {}) {
  72. // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:3: error: cannot access member of interface `HasF` in type `{}` that does not implement that interface [MissingImplInMemberAccess]
  73. // CHECK:STDERR: x.(HasF.F)();
  74. // CHECK:STDERR: ^~~~~~~~~~
  75. // CHECK:STDERR:
  76. x.(HasF.F)();
  77. }
  78. // --- fail_inconsistent_deduction.carbon
  79. library "[[@TEST_NAME]]";
  80. interface HasF(T:! type) {
  81. fn F[self: Self]();
  82. }
  83. impl forall [T:! type] T as HasF(T) {
  84. fn F[unused self: Self]() {}
  85. }
  86. class A {}
  87. class B {}
  88. fn G(x: A) {
  89. // TODO: It'd be nice to include a note here saying that deduction failed because
  90. // we deduced two different values for `T`.
  91. // CHECK:STDERR: fail_inconsistent_deduction.carbon:[[@LINE+4]]:3: error: cannot access member of interface `HasF(B)` in type `A` that does not implement that interface [MissingImplInMemberAccess]
  92. // CHECK:STDERR: x.(HasF(B).F)();
  93. // CHECK:STDERR: ^~~~~~~~~~~~~
  94. // CHECK:STDERR:
  95. x.(HasF(B).F)();
  96. }
  97. // CHECK:STDOUT: --- deduced_type.carbon
  98. // CHECK:STDOUT:
  99. // CHECK:STDOUT: constants {
  100. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  101. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
  102. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  103. // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic]
  104. // CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%Self) [symbolic]
  105. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  106. // CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic]
  107. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  108. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
  109. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  110. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  111. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  112. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  113. // CHECK:STDOUT: %HasF.impl_witness.c31: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
  114. // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
  115. // CHECK:STDOUT: %T.as.HasF.impl.F.type.12d: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
  116. // CHECK:STDOUT: %T.as.HasF.impl.F.4f8: %T.as.HasF.impl.F.type.12d = struct_value () [symbolic]
  117. // CHECK:STDOUT: %HasF.facet.31c: %HasF.type = facet_value %T, (%HasF.impl_witness.c31) [symbolic]
  118. // CHECK:STDOUT: %HasF.WithSelf.F.type.c95: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%HasF.facet.31c) [symbolic]
  119. // CHECK:STDOUT: %HasF.WithSelf.F.7ba: %HasF.WithSelf.F.type.c95 = struct_value () [symbolic]
  120. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  121. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  122. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  123. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  124. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  125. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  126. // CHECK:STDOUT: %HasF.impl_witness.ada: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%empty_struct_type) [concrete]
  127. // CHECK:STDOUT: %T.as.HasF.impl.F.type.472: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%empty_struct_type) [concrete]
  128. // CHECK:STDOUT: %T.as.HasF.impl.F.bd4: %T.as.HasF.impl.F.type.472 = struct_value () [concrete]
  129. // CHECK:STDOUT: %HasF.facet.53a: %HasF.type = facet_value %empty_struct_type, (%HasF.impl_witness.ada) [concrete]
  130. // CHECK:STDOUT: %HasF.WithSelf.F.type.09b: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%HasF.facet.53a) [concrete]
  131. // CHECK:STDOUT: %HasF.WithSelf.F.cc2: %HasF.WithSelf.F.type.09b = struct_value () [concrete]
  132. // CHECK:STDOUT: %.f64: type = fn_type_with_self_type %HasF.WithSelf.F.type.09b, %HasF.facet.53a [concrete]
  133. // CHECK:STDOUT: %T.as.HasF.impl.F.specific_fn: <specific function> = specific_function %T.as.HasF.impl.F.bd4, @T.as.HasF.impl.F(%empty_struct_type) [concrete]
  134. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  135. // CHECK:STDOUT: }
  136. // CHECK:STDOUT:
  137. // CHECK:STDOUT: imports {
  138. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  139. // CHECK:STDOUT: import Core//prelude
  140. // CHECK:STDOUT: import Core//prelude/...
  141. // CHECK:STDOUT: }
  142. // CHECK:STDOUT: }
  143. // CHECK:STDOUT:
  144. // CHECK:STDOUT: file {
  145. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  146. // CHECK:STDOUT: .Core = imports.%Core
  147. // CHECK:STDOUT: .HasF = %HasF.decl
  148. // CHECK:STDOUT: .G = %G.decl
  149. // CHECK:STDOUT: }
  150. // CHECK:STDOUT: %Core.import = import Core
  151. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  152. // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
  153. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  154. // CHECK:STDOUT: } {
  155. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  156. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  157. // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
  158. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  159. // CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
  160. // CHECK:STDOUT: }
  161. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  162. // CHECK:STDOUT: }
  163. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  164. // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern [concrete]
  165. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = at_binding_pattern x, %x.param_patt [concrete]
  166. // CHECK:STDOUT: } {
  167. // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
  168. // CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = constants.%empty_struct_type] {
  169. // CHECK:STDOUT: %.loc12_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  170. // CHECK:STDOUT: %.loc12_10.3: type = converted %.loc12_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  171. // CHECK:STDOUT: }
  172. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
  173. // CHECK:STDOUT: }
  174. // CHECK:STDOUT: }
  175. // CHECK:STDOUT:
  176. // CHECK:STDOUT: interface @HasF {
  177. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  178. // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
  179. // CHECK:STDOUT:
  180. // CHECK:STDOUT: !with Self:
  181. // CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.WithSelf.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.WithSelf.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] {
  182. // CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern [concrete]
  183. // CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = at_binding_pattern self, %self.param_patt [concrete]
  184. // CHECK:STDOUT: } {
  185. // CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  186. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  187. // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
  188. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  189. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  192. // CHECK:STDOUT: }
  193. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0]
  194. // CHECK:STDOUT:
  195. // CHECK:STDOUT: !members:
  196. // CHECK:STDOUT: .Self = %Self
  197. // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0
  198. // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
  199. // CHECK:STDOUT:
  200. // CHECK:STDOUT: !requires:
  201. // CHECK:STDOUT: }
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_14.2: type) {
  204. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  205. // CHECK:STDOUT: %HasF.impl_witness.loc8_34.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.c31)]
  206. // CHECK:STDOUT:
  207. // CHECK:STDOUT: !definition:
  208. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type.12d)]
  209. // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type.12d) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F.4f8)]
  210. // CHECK:STDOUT:
  211. // CHECK:STDOUT: impl: %T.ref as %HasF.ref {
  212. // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type.12d) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F.4f8)] {
  213. // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [concrete]
  214. // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern self, %self.param_patt [concrete]
  215. // CHECK:STDOUT: } {
  216. // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
  217. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
  218. // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
  219. // CHECK:STDOUT: }
  220. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
  221. // CHECK:STDOUT: %HasF.impl_witness.loc8_34.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.c31)]
  222. // CHECK:STDOUT:
  223. // CHECK:STDOUT: !members:
  224. // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
  225. // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1
  226. // CHECK:STDOUT: }
  227. // CHECK:STDOUT: }
  228. // CHECK:STDOUT:
  229. // CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self: %HasF.type) {
  230. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  231. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  232. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type));
  235. // CHECK:STDOUT: }
  236. // CHECK:STDOUT:
  237. // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
  238. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  239. // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
  240. // CHECK:STDOUT:
  241. // CHECK:STDOUT: !definition:
  242. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
  245. // CHECK:STDOUT: !entry:
  246. // CHECK:STDOUT: return
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT: }
  249. // CHECK:STDOUT:
  250. // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
  251. // CHECK:STDOUT: !entry:
  252. // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
  253. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  254. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.WithSelf.%assoc0 [concrete = constants.%assoc0]
  255. // CHECK:STDOUT: %impl.elem0: %.f64 = impl_witness_access constants.%HasF.impl_witness.ada, element0 [concrete = constants.%T.as.HasF.impl.F.bd4]
  256. // CHECK:STDOUT: %bound_method.loc13_4: <bound method> = bound_method %x.ref, %impl.elem0
  257. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @T.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%T.as.HasF.impl.F.specific_fn]
  258. // CHECK:STDOUT: %bound_method.loc13_14: <bound method> = bound_method %x.ref, %specific_fn
  259. // CHECK:STDOUT: %T.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc13_14(%x.ref)
  260. // CHECK:STDOUT: return
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%Self) {
  264. // CHECK:STDOUT: !definition:
  265. // CHECK:STDOUT: %Self => constants.%Self
  266. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc
  267. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa
  268. // CHECK:STDOUT: }
  269. // CHECK:STDOUT:
  270. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) {
  271. // CHECK:STDOUT: %Self => constants.%Self
  272. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  273. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
  274. // CHECK:STDOUT: }
  275. // CHECK:STDOUT:
  276. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
  277. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  278. // CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.c31
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: !definition:
  281. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.12d
  282. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.4f8
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT:
  285. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T) {
  286. // CHECK:STDOUT: %T => constants.%T
  287. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%HasF.facet.31c) {
  291. // CHECK:STDOUT: !definition:
  292. // CHECK:STDOUT: %Self => constants.%HasF.facet.31c
  293. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.c95
  294. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.7ba
  295. // CHECK:STDOUT: }
  296. // CHECK:STDOUT:
  297. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet.31c) {
  298. // CHECK:STDOUT: %Self => constants.%HasF.facet.31c
  299. // CHECK:STDOUT: %Self.binding.as_type => constants.%T
  300. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
  301. // CHECK:STDOUT: }
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%empty_struct_type) {
  304. // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
  305. // CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.ada
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: !definition:
  308. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.472
  309. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.bd4
  310. // CHECK:STDOUT: }
  311. // CHECK:STDOUT:
  312. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%HasF.facet.53a) {
  313. // CHECK:STDOUT: !definition:
  314. // CHECK:STDOUT: %Self => constants.%HasF.facet.53a
  315. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.09b
  316. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.cc2
  317. // CHECK:STDOUT: }
  318. // CHECK:STDOUT:
  319. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%empty_struct_type) {
  320. // CHECK:STDOUT: %T => constants.%empty_struct_type
  321. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96
  322. // CHECK:STDOUT:
  323. // CHECK:STDOUT: !definition:
  324. // CHECK:STDOUT: %require_complete => constants.%complete_type
  325. // CHECK:STDOUT: }
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: --- deduced_type_subst.carbon
  328. // CHECK:STDOUT:
  329. // CHECK:STDOUT: constants {
  330. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  331. // CHECK:STDOUT: %Self.f09: %HasF.type = symbolic_binding Self, 0 [symbolic]
  332. // CHECK:STDOUT: %Self.binding.as_type.87c: type = symbolic_binding_type Self, 0, %Self.f09 [symbolic]
  333. // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type.87c [symbolic]
  334. // CHECK:STDOUT: %.779: Core.Form = init_form %Self.binding.as_type.87c [symbolic]
  335. // CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%Self.f09) [symbolic]
  336. // CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic]
  337. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  338. // CHECK:STDOUT: %assoc0.a7f: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
  339. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  340. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  341. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  342. // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
  343. // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic]
  344. // CHECK:STDOUT: %HasF.impl_witness.e63: <witness> = impl_witness @ptr.as.HasF.impl.%HasF.impl_witness_table, @ptr.as.HasF.impl(%T.67d) [symbolic]
  345. // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
  346. // CHECK:STDOUT: %.cb6: Core.Form = init_form %ptr.e8f [symbolic]
  347. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.672: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.67d) [symbolic]
  348. // CHECK:STDOUT: %ptr.as.HasF.impl.F.dbd: %ptr.as.HasF.impl.F.type.672 = struct_value () [symbolic]
  349. // CHECK:STDOUT: %HasF.facet.506: %HasF.type = facet_value %ptr.e8f, (%HasF.impl_witness.e63) [symbolic]
  350. // CHECK:STDOUT: %HasF.WithSelf.F.type.ac0: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%HasF.facet.506) [symbolic]
  351. // CHECK:STDOUT: %HasF.WithSelf.F.91f: %HasF.WithSelf.F.type.ac0 = struct_value () [symbolic]
  352. // CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
  353. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  354. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic]
  355. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic]
  356. // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr.e8f, @Copy [symbolic]
  357. // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
  358. // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic]
  359. // CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.c25) [symbolic]
  360. // CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic]
  361. // CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
  362. // CHECK:STDOUT: %specific_impl_fn.366: <specific function> = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic]
  363. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  364. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  365. // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete]
  366. // CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %ptr.c28 [concrete]
  367. // CHECK:STDOUT: %.9ba: Core.Form = init_form %ptr.c28 [concrete]
  368. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  369. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  370. // CHECK:STDOUT: %HasF.impl_witness.e25: <witness> = impl_witness @ptr.as.HasF.impl.%HasF.impl_witness_table, @ptr.as.HasF.impl(%empty_struct_type) [concrete]
  371. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.5bc: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%empty_struct_type) [concrete]
  372. // CHECK:STDOUT: %ptr.as.HasF.impl.F.8a8: %ptr.as.HasF.impl.F.type.5bc = struct_value () [concrete]
  373. // CHECK:STDOUT: %HasF.facet.b93: %HasF.type = facet_value %ptr.c28, (%HasF.impl_witness.e25) [concrete]
  374. // CHECK:STDOUT: %HasF.WithSelf.F.type.c08: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%HasF.facet.b93) [concrete]
  375. // CHECK:STDOUT: %HasF.WithSelf.F.e22: %HasF.WithSelf.F.type.c08 = struct_value () [concrete]
  376. // CHECK:STDOUT: %.f85: type = fn_type_with_self_type %HasF.WithSelf.F.type.c08, %HasF.facet.b93 [concrete]
  377. // CHECK:STDOUT: %ptr.as.HasF.impl.F.specific_fn: <specific function> = specific_function %ptr.as.HasF.impl.F.8a8, @ptr.as.HasF.impl.F(%empty_struct_type) [concrete]
  378. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %ptr.c28 [concrete]
  379. // CHECK:STDOUT: %Copy.impl_witness.3fd: <witness> = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%empty_struct_type) [concrete]
  380. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.032: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%empty_struct_type) [concrete]
  381. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.cbf: %ptr.as.Copy.impl.Op.type.032 = struct_value () [concrete]
  382. // CHECK:STDOUT: %.07c: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%empty_struct_type) [concrete]
  383. // CHECK:STDOUT: %Copy.facet.111: %Copy.type = facet_value %ptr.c28, (%Copy.impl_witness.3fd) [concrete]
  384. // CHECK:STDOUT: %Copy.WithSelf.Op.type.514: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.111) [concrete]
  385. // CHECK:STDOUT: %.237: type = fn_type_with_self_type %Copy.WithSelf.Op.type.514, %Copy.facet.111 [concrete]
  386. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.cbf, @ptr.as.Copy.impl.Op(%empty_struct_type) [concrete]
  387. // CHECK:STDOUT: }
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: imports {
  390. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  391. // CHECK:STDOUT: .Copy = %Core.Copy
  392. // CHECK:STDOUT: import Core//prelude
  393. // CHECK:STDOUT: import Core//prelude/...
  394. // CHECK:STDOUT: }
  395. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  396. // CHECK:STDOUT: %Core.import_ref.203: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.2d4) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.74e)]
  397. // CHECK:STDOUT: %Copy.impl_witness_table.c3a = impl_witness_table (%Core.import_ref.203), @ptr.as.Copy.impl [concrete]
  398. // CHECK:STDOUT: }
  399. // CHECK:STDOUT:
  400. // CHECK:STDOUT: file {
  401. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  402. // CHECK:STDOUT: .Core = imports.%Core
  403. // CHECK:STDOUT: .HasF = %HasF.decl
  404. // CHECK:STDOUT: .G = %G.decl
  405. // CHECK:STDOUT: }
  406. // CHECK:STDOUT: %Core.import = import Core
  407. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  408. // CHECK:STDOUT: impl_decl @ptr.as.HasF.impl [concrete] {
  409. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  410. // CHECK:STDOUT: } {
  411. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T.67d)]
  412. // CHECK:STDOUT: %ptr.loc8_25.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)]
  413. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  414. // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
  415. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  416. // CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T.67d)]
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  421. // CHECK:STDOUT: %x.param_patt: %pattern_type.1cc = value_param_pattern [concrete]
  422. // CHECK:STDOUT: %x.patt: %pattern_type.1cc = at_binding_pattern x, %x.param_patt [concrete]
  423. // CHECK:STDOUT: %return.param_patt: %pattern_type.1cc = out_param_pattern [concrete]
  424. // CHECK:STDOUT: %return.patt: %pattern_type.1cc = return_slot_pattern %return.param_patt, %ptr.loc12_19 [concrete]
  425. // CHECK:STDOUT: } {
  426. // CHECK:STDOUT: %.loc12_18: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  427. // CHECK:STDOUT: %.loc12_19.1: type = converted %.loc12_18, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  428. // CHECK:STDOUT: %ptr.loc12_19: type = ptr_type %.loc12_19.1 [concrete = constants.%ptr.c28]
  429. // CHECK:STDOUT: %.loc12_19.2: Core.Form = init_form %ptr.loc12_19 [concrete = constants.%.9ba]
  430. // CHECK:STDOUT: %x.param: %ptr.c28 = value_param call_param0
  431. // CHECK:STDOUT: %.loc12_11.1: type = splice_block %ptr.loc12_11 [concrete = constants.%ptr.c28] {
  432. // CHECK:STDOUT: %.loc12_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  433. // CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  434. // CHECK:STDOUT: %ptr.loc12_11: type = ptr_type %.loc12_11.2 [concrete = constants.%ptr.c28]
  435. // CHECK:STDOUT: }
  436. // CHECK:STDOUT: %x: %ptr.c28 = value_binding x, %x.param
  437. // CHECK:STDOUT: %return.param: ref %ptr.c28 = out_param call_param1
  438. // CHECK:STDOUT: %return: ref %ptr.c28 = return_slot %return.param
  439. // CHECK:STDOUT: }
  440. // CHECK:STDOUT: }
  441. // CHECK:STDOUT:
  442. // CHECK:STDOUT: interface @HasF {
  443. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f09]
  444. // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
  445. // CHECK:STDOUT:
  446. // CHECK:STDOUT: !with Self:
  447. // CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.WithSelf.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.WithSelf.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] {
  448. // CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern [concrete]
  449. // CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = at_binding_pattern self, %self.param_patt [concrete]
  450. // CHECK:STDOUT: %return.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = out_param_pattern [concrete]
  451. // CHECK:STDOUT: %return.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = return_slot_pattern %return.param_patt, %.loc5_25.2 [concrete]
  452. // CHECK:STDOUT: } {
  453. // CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f09)]
  454. // CHECK:STDOUT: %Self.as_type.loc5_25: type = facet_access_type %Self.ref.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
  455. // CHECK:STDOUT: %.loc5_25.2: type = converted %Self.ref.loc5_25, %Self.as_type.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
  456. // CHECK:STDOUT: %.loc5_25.3: Core.Form = init_form %.loc5_25.2 [symbolic = %.loc5_25.1 (constants.%.779)]
  457. // CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_param call_param0
  458. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] {
  459. // CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f09)]
  460. // CHECK:STDOUT: %Self.as_type.loc5_14: type = facet_access_type %Self.ref.loc5_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
  461. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref.loc5_14, %Self.as_type.loc5_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
  462. // CHECK:STDOUT: }
  463. // CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_binding self, %self.param
  464. // CHECK:STDOUT: %return.param: ref @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = out_param call_param1
  465. // CHECK:STDOUT: %return: ref @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = return_slot %return.param
  466. // CHECK:STDOUT: }
  467. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0.a7f]
  468. // CHECK:STDOUT:
  469. // CHECK:STDOUT: !members:
  470. // CHECK:STDOUT: .Self = %Self
  471. // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0
  472. // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
  473. // CHECK:STDOUT:
  474. // CHECK:STDOUT: !requires:
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT:
  477. // CHECK:STDOUT: generic impl @ptr.as.HasF.impl(%T.loc8_14.2: type) {
  478. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T.67d)]
  479. // CHECK:STDOUT: %ptr.loc8_25.1: type = ptr_type %T.loc8_14.1 [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)]
  480. // CHECK:STDOUT: %HasF.impl_witness.loc8_35.2: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.e63)]
  481. // CHECK:STDOUT:
  482. // CHECK:STDOUT: !definition:
  483. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.loc8_14.1) [symbolic = %ptr.as.HasF.impl.F.type (constants.%ptr.as.HasF.impl.F.type.672)]
  484. // CHECK:STDOUT: %ptr.as.HasF.impl.F: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.672) = struct_value () [symbolic = %ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.dbd)]
  485. // CHECK:STDOUT:
  486. // CHECK:STDOUT: impl: %ptr.loc8_25.2 as %HasF.ref {
  487. // CHECK:STDOUT: %ptr.as.HasF.impl.F.decl: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.672) = fn_decl @ptr.as.HasF.impl.F [symbolic = @ptr.as.HasF.impl.%ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.dbd)] {
  488. // CHECK:STDOUT: %self.param_patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = value_param_pattern [concrete]
  489. // CHECK:STDOUT: %self.patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = at_binding_pattern self, %self.param_patt [concrete]
  490. // CHECK:STDOUT: %return.param_patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = out_param_pattern [concrete]
  491. // CHECK:STDOUT: %return.patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = return_slot_pattern %return.param_patt, %ptr.loc9_26 [concrete]
  492. // CHECK:STDOUT: } {
  493. // CHECK:STDOUT: %T.ref: type = name_ref T, @ptr.as.HasF.impl.%T.loc8_14.2 [symbolic = %T (constants.%T.67d)]
  494. // CHECK:STDOUT: %ptr.loc9_26: type = ptr_type %T.ref [symbolic = %ptr.loc9_14 (constants.%ptr.e8f)]
  495. // CHECK:STDOUT: %.loc9_26.2: Core.Form = init_form %ptr.loc9_26 [symbolic = %.loc9_26.1 (constants.%.cb6)]
  496. // CHECK:STDOUT: %self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = value_param call_param0
  497. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_25.2 [symbolic = %ptr.loc9_14 (constants.%ptr.e8f)]
  498. // CHECK:STDOUT: %self: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = value_binding self, %self.param
  499. // CHECK:STDOUT: %return.param: ref @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = out_param call_param1
  500. // CHECK:STDOUT: %return: ref @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = return_slot %return.param
  501. // CHECK:STDOUT: }
  502. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%ptr.as.HasF.impl.F.decl), @ptr.as.HasF.impl [concrete]
  503. // CHECK:STDOUT: %HasF.impl_witness.loc8_35.1: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.e63)]
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: !members:
  506. // CHECK:STDOUT: .T = <poisoned>
  507. // CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl
  508. // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_35.1
  509. // CHECK:STDOUT: }
  510. // CHECK:STDOUT: }
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self: %HasF.type) {
  513. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f09)]
  514. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
  515. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
  516. // CHECK:STDOUT: %.loc5_25.1: Core.Form = init_form %Self.binding.as_type [symbolic = %.loc5_25.1 (constants.%.779)]
  517. // CHECK:STDOUT:
  518. // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c)) -> out %return.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c);
  519. // CHECK:STDOUT: }
  520. // CHECK:STDOUT:
  521. // CHECK:STDOUT: generic fn @ptr.as.HasF.impl.F(@ptr.as.HasF.impl.%T.loc8_14.2: type) {
  522. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
  523. // CHECK:STDOUT: %ptr.loc9_14: type = ptr_type %T [symbolic = %ptr.loc9_14 (constants.%ptr.e8f)]
  524. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc9_14 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
  525. // CHECK:STDOUT: %.loc9_26.1: Core.Form = init_form %ptr.loc9_14 [symbolic = %.loc9_26.1 (constants.%.cb6)]
  526. // CHECK:STDOUT:
  527. // CHECK:STDOUT: !definition:
  528. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc9_14 [symbolic = %require_complete (constants.%require_complete.ef1)]
  529. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc9_14, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)]
  530. // CHECK:STDOUT: %.loc9_37.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T) [symbolic = %.loc9_37.1 (constants.%.2f2)]
  531. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc9_14, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)]
  532. // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)]
  533. // CHECK:STDOUT: %.loc9_37.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc9_37.2 (constants.%.299)]
  534. // CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.1c7)]
  535. // CHECK:STDOUT: %specific_impl_fn.loc9_37.2: <specific function> = specific_impl_function %impl.elem0.loc9_37.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.366)]
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: fn(%self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f)) -> out %return.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) {
  538. // CHECK:STDOUT: !entry:
  539. // CHECK:STDOUT: %self.ref: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = name_ref self, %self
  540. // CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.1c7)]
  541. // CHECK:STDOUT: %bound_method.loc9_37.1: <bound method> = bound_method %self.ref, %impl.elem0.loc9_37.1
  542. // CHECK:STDOUT: %specific_impl_fn.loc9_37.1: <specific function> = specific_impl_function %impl.elem0.loc9_37.1, @Copy.WithSelf.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.366)]
  543. // CHECK:STDOUT: %bound_method.loc9_37.2: <bound method> = bound_method %self.ref, %specific_impl_fn.loc9_37.1
  544. // CHECK:STDOUT: %Copy.WithSelf.Op.call: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = call %bound_method.loc9_37.2(%self.ref)
  545. // CHECK:STDOUT: return %Copy.WithSelf.Op.call
  546. // CHECK:STDOUT: }
  547. // CHECK:STDOUT: }
  548. // CHECK:STDOUT:
  549. // CHECK:STDOUT: fn @G(%x.param: %ptr.c28) -> out %return.param: %ptr.c28 {
  550. // CHECK:STDOUT: !entry:
  551. // CHECK:STDOUT: %x.ref: %ptr.c28 = name_ref x, %x
  552. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  553. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.WithSelf.%assoc0 [concrete = constants.%assoc0.a7f]
  554. // CHECK:STDOUT: %impl.elem0: %.f85 = impl_witness_access constants.%HasF.impl_witness.e25, element0 [concrete = constants.%ptr.as.HasF.impl.F.8a8]
  555. // CHECK:STDOUT: %bound_method.loc13_11: <bound method> = bound_method %x.ref, %impl.elem0
  556. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @ptr.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%ptr.as.HasF.impl.F.specific_fn]
  557. // CHECK:STDOUT: %bound_method.loc13_21: <bound method> = bound_method %x.ref, %specific_fn
  558. // CHECK:STDOUT: %ptr.as.HasF.impl.F.call: init %ptr.c28 = call %bound_method.loc13_21(%x.ref)
  559. // CHECK:STDOUT: return %ptr.as.HasF.impl.F.call
  560. // CHECK:STDOUT: }
  561. // CHECK:STDOUT:
  562. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%Self.f09) {
  563. // CHECK:STDOUT: !definition:
  564. // CHECK:STDOUT: %Self => constants.%Self.f09
  565. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc
  566. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa
  567. // CHECK:STDOUT: }
  568. // CHECK:STDOUT:
  569. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self.f09) {
  570. // CHECK:STDOUT: %Self => constants.%Self.f09
  571. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.87c
  572. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
  573. // CHECK:STDOUT: %.loc5_25.1 => constants.%.779
  574. // CHECK:STDOUT: }
  575. // CHECK:STDOUT:
  576. // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%T.67d) {
  577. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T.67d
  578. // CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.e8f
  579. // CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.e63
  580. // CHECK:STDOUT:
  581. // CHECK:STDOUT: !definition:
  582. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.672
  583. // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.dbd
  584. // CHECK:STDOUT: }
  585. // CHECK:STDOUT:
  586. // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%T.67d) {
  587. // CHECK:STDOUT: %T => constants.%T.67d
  588. // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.e8f
  589. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
  590. // CHECK:STDOUT: %.loc9_26.1 => constants.%.cb6
  591. // CHECK:STDOUT: }
  592. // CHECK:STDOUT:
  593. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%HasF.facet.506) {
  594. // CHECK:STDOUT: !definition:
  595. // CHECK:STDOUT: %Self => constants.%HasF.facet.506
  596. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.ac0
  597. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.91f
  598. // CHECK:STDOUT: }
  599. // CHECK:STDOUT:
  600. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet.506) {
  601. // CHECK:STDOUT: %Self => constants.%HasF.facet.506
  602. // CHECK:STDOUT: %Self.binding.as_type => constants.%ptr.e8f
  603. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
  604. // CHECK:STDOUT: %.loc5_25.1 => constants.%.cb6
  605. // CHECK:STDOUT: }
  606. // CHECK:STDOUT:
  607. // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%empty_struct_type) {
  608. // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
  609. // CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.c28
  610. // CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.e25
  611. // CHECK:STDOUT:
  612. // CHECK:STDOUT: !definition:
  613. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.5bc
  614. // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.8a8
  615. // CHECK:STDOUT: }
  616. // CHECK:STDOUT:
  617. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%HasF.facet.b93) {
  618. // CHECK:STDOUT: !definition:
  619. // CHECK:STDOUT: %Self => constants.%HasF.facet.b93
  620. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.c08
  621. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.e22
  622. // CHECK:STDOUT: }
  623. // CHECK:STDOUT:
  624. // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%empty_struct_type) {
  625. // CHECK:STDOUT: %T => constants.%empty_struct_type
  626. // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.c28
  627. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1cc
  628. // CHECK:STDOUT: %.loc9_26.1 => constants.%.9ba
  629. // CHECK:STDOUT:
  630. // CHECK:STDOUT: !definition:
  631. // CHECK:STDOUT: %require_complete => constants.%complete_type
  632. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.3fd
  633. // CHECK:STDOUT: %.loc9_37.1 => constants.%.07c
  634. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.111
  635. // CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.514
  636. // CHECK:STDOUT: %.loc9_37.2 => constants.%.237
  637. // CHECK:STDOUT: %impl.elem0.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.cbf
  638. // CHECK:STDOUT: %specific_impl_fn.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
  639. // CHECK:STDOUT: }
  640. // CHECK:STDOUT:
  641. // CHECK:STDOUT: --- deduced_type_argument.carbon
  642. // CHECK:STDOUT:
  643. // CHECK:STDOUT: constants {
  644. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  645. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
  646. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  647. // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic]
  648. // CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%Self) [symbolic]
  649. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  650. // CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic]
  651. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  652. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
  653. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  654. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  655. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  656. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  657. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  658. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  659. // CHECK:STDOUT: %C.5a3: type = class_type @C, @C(%T) [symbolic]
  660. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  661. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  662. // CHECK:STDOUT: %HasF.impl_witness.61b: <witness> = impl_witness @C.as.HasF.impl.%HasF.impl_witness_table, @C.as.HasF.impl(%T) [symbolic]
  663. // CHECK:STDOUT: %pattern_type.3d5: type = pattern_type %C.5a3 [symbolic]
  664. // CHECK:STDOUT: %C.as.HasF.impl.F.type.fb0: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T) [symbolic]
  665. // CHECK:STDOUT: %C.as.HasF.impl.F.f34: %C.as.HasF.impl.F.type.fb0 = struct_value () [symbolic]
  666. // CHECK:STDOUT: %HasF.facet.834: %HasF.type = facet_value %C.5a3, (%HasF.impl_witness.61b) [symbolic]
  667. // CHECK:STDOUT: %HasF.WithSelf.F.type.796: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%HasF.facet.834) [symbolic]
  668. // CHECK:STDOUT: %HasF.WithSelf.F.3a2: %HasF.WithSelf.F.type.796 = struct_value () [symbolic]
  669. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C.5a3 [symbolic]
  670. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  671. // CHECK:STDOUT: %C.850: type = class_type @C, @C(%empty_struct_type) [concrete]
  672. // CHECK:STDOUT: %pattern_type.526: type = pattern_type %C.850 [concrete]
  673. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  674. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  675. // CHECK:STDOUT: %HasF.impl_witness.635: <witness> = impl_witness @C.as.HasF.impl.%HasF.impl_witness_table, @C.as.HasF.impl(%empty_struct_type) [concrete]
  676. // CHECK:STDOUT: %C.as.HasF.impl.F.type.98f: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%empty_struct_type) [concrete]
  677. // CHECK:STDOUT: %C.as.HasF.impl.F.a6f: %C.as.HasF.impl.F.type.98f = struct_value () [concrete]
  678. // CHECK:STDOUT: %HasF.facet.514: %HasF.type = facet_value %C.850, (%HasF.impl_witness.635) [concrete]
  679. // CHECK:STDOUT: %HasF.WithSelf.F.type.753: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%HasF.facet.514) [concrete]
  680. // CHECK:STDOUT: %HasF.WithSelf.F.412: %HasF.WithSelf.F.type.753 = struct_value () [concrete]
  681. // CHECK:STDOUT: %.914: type = fn_type_with_self_type %HasF.WithSelf.F.type.753, %HasF.facet.514 [concrete]
  682. // CHECK:STDOUT: %C.as.HasF.impl.F.specific_fn: <specific function> = specific_function %C.as.HasF.impl.F.a6f, @C.as.HasF.impl.F(%empty_struct_type) [concrete]
  683. // CHECK:STDOUT: }
  684. // CHECK:STDOUT:
  685. // CHECK:STDOUT: imports {
  686. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  687. // CHECK:STDOUT: import Core//prelude
  688. // CHECK:STDOUT: import Core//prelude/...
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT:
  692. // CHECK:STDOUT: file {
  693. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  694. // CHECK:STDOUT: .Core = imports.%Core
  695. // CHECK:STDOUT: .HasF = %HasF.decl
  696. // CHECK:STDOUT: .C = %C.decl
  697. // CHECK:STDOUT: .G = %G.decl
  698. // CHECK:STDOUT: }
  699. // CHECK:STDOUT: %Core.import = import Core
  700. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  701. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
  702. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  703. // CHECK:STDOUT: } {
  704. // CHECK:STDOUT: %.loc8_13.1: type = splice_block %.loc8_13.2 [concrete = type] {
  705. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  706. // CHECK:STDOUT: %.loc8_13.2: type = type_literal type [concrete = type]
  707. // CHECK:STDOUT: }
  708. // CHECK:STDOUT: %T.loc8_9.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
  709. // CHECK:STDOUT: }
  710. // CHECK:STDOUT: impl_decl @C.as.HasF.impl [concrete] {
  711. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  712. // CHECK:STDOUT: } {
  713. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  714. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.2 [symbolic = %T.loc10_14.1 (constants.%T)]
  715. // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C.5a3)]
  716. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  717. // CHECK:STDOUT: %.loc10_18.1: type = splice_block %.loc10_18.2 [concrete = type] {
  718. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  719. // CHECK:STDOUT: %.loc10_18.2: type = type_literal type [concrete = type]
  720. // CHECK:STDOUT: }
  721. // CHECK:STDOUT: %T.loc10_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
  722. // CHECK:STDOUT: }
  723. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  724. // CHECK:STDOUT: %x.param_patt: %pattern_type.526 = value_param_pattern [concrete]
  725. // CHECK:STDOUT: %x.patt: %pattern_type.526 = at_binding_pattern x, %x.param_patt [concrete]
  726. // CHECK:STDOUT: } {
  727. // CHECK:STDOUT: %x.param: %C.850 = value_param call_param0
  728. // CHECK:STDOUT: %.loc14_13.1: type = splice_block %C [concrete = constants.%C.850] {
  729. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  730. // CHECK:STDOUT: %.loc14_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  731. // CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  732. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.850]
  733. // CHECK:STDOUT: }
  734. // CHECK:STDOUT: %x: %C.850 = value_binding x, %x.param
  735. // CHECK:STDOUT: }
  736. // CHECK:STDOUT: }
  737. // CHECK:STDOUT:
  738. // CHECK:STDOUT: interface @HasF {
  739. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  740. // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
  741. // CHECK:STDOUT:
  742. // CHECK:STDOUT: !with Self:
  743. // CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.WithSelf.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.WithSelf.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] {
  744. // CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern [concrete]
  745. // CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = at_binding_pattern self, %self.param_patt [concrete]
  746. // CHECK:STDOUT: } {
  747. // CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  748. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  749. // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
  750. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  751. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  754. // CHECK:STDOUT: }
  755. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0]
  756. // CHECK:STDOUT:
  757. // CHECK:STDOUT: !members:
  758. // CHECK:STDOUT: .Self = %Self
  759. // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0
  760. // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
  761. // CHECK:STDOUT:
  762. // CHECK:STDOUT: !requires:
  763. // CHECK:STDOUT: }
  764. // CHECK:STDOUT:
  765. // CHECK:STDOUT: generic impl @C.as.HasF.impl(%T.loc10_14.2: type) {
  766. // CHECK:STDOUT: %T.loc10_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
  767. // CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_14.1) [symbolic = %C.loc10_27.1 (constants.%C.5a3)]
  768. // CHECK:STDOUT: %HasF.impl_witness.loc10_37.2: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_14.1) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.61b)]
  769. // CHECK:STDOUT:
  770. // CHECK:STDOUT: !definition:
  771. // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T.loc10_14.1) [symbolic = %C.as.HasF.impl.F.type (constants.%C.as.HasF.impl.F.type.fb0)]
  772. // CHECK:STDOUT: %C.as.HasF.impl.F: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.fb0) = struct_value () [symbolic = %C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.f34)]
  773. // CHECK:STDOUT:
  774. // CHECK:STDOUT: impl: %C.loc10_27.2 as %HasF.ref {
  775. // CHECK:STDOUT: %C.as.HasF.impl.F.decl: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.fb0) = fn_decl @C.as.HasF.impl.F [symbolic = @C.as.HasF.impl.%C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.f34)] {
  776. // CHECK:STDOUT: %self.param_patt: @C.as.HasF.impl.F.%pattern_type (%pattern_type.3d5) = value_param_pattern [concrete]
  777. // CHECK:STDOUT: %self.patt: @C.as.HasF.impl.F.%pattern_type (%pattern_type.3d5) = at_binding_pattern self, %self.param_patt [concrete]
  778. // CHECK:STDOUT: } {
  779. // CHECK:STDOUT: %self.param: @C.as.HasF.impl.F.%C (%C.5a3) = value_param call_param0
  780. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_27.2 [symbolic = %C (constants.%C.5a3)]
  781. // CHECK:STDOUT: %self: @C.as.HasF.impl.F.%C (%C.5a3) = value_binding self, %self.param
  782. // CHECK:STDOUT: }
  783. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete]
  784. // CHECK:STDOUT: %HasF.impl_witness.loc10_37.1: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.61b)]
  785. // CHECK:STDOUT:
  786. // CHECK:STDOUT: !members:
  787. // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
  788. // CHECK:STDOUT: witness = %HasF.impl_witness.loc10_37.1
  789. // CHECK:STDOUT: }
  790. // CHECK:STDOUT: }
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: generic class @C(%T.loc8_9.2: type) {
  793. // CHECK:STDOUT: %T.loc8_9.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
  794. // CHECK:STDOUT:
  795. // CHECK:STDOUT: !definition:
  796. // CHECK:STDOUT:
  797. // CHECK:STDOUT: class {
  798. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  799. // CHECK:STDOUT: complete_type_witness = %complete_type
  800. // CHECK:STDOUT:
  801. // CHECK:STDOUT: !members:
  802. // CHECK:STDOUT: .Self = constants.%C.5a3
  803. // CHECK:STDOUT: }
  804. // CHECK:STDOUT: }
  805. // CHECK:STDOUT:
  806. // CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self: %HasF.type) {
  807. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  808. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  809. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
  810. // CHECK:STDOUT:
  811. // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type));
  812. // CHECK:STDOUT: }
  813. // CHECK:STDOUT:
  814. // CHECK:STDOUT: generic fn @C.as.HasF.impl.F(@C.as.HasF.impl.%T.loc10_14.2: type) {
  815. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  816. // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.5a3)]
  817. // CHECK:STDOUT: %pattern_type: type = pattern_type %C [symbolic = %pattern_type (constants.%pattern_type.3d5)]
  818. // CHECK:STDOUT:
  819. // CHECK:STDOUT: !definition:
  820. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C [symbolic = %require_complete (constants.%require_complete)]
  821. // CHECK:STDOUT:
  822. // CHECK:STDOUT: fn(%self.param: @C.as.HasF.impl.F.%C (%C.5a3)) {
  823. // CHECK:STDOUT: !entry:
  824. // CHECK:STDOUT: return
  825. // CHECK:STDOUT: }
  826. // CHECK:STDOUT: }
  827. // CHECK:STDOUT:
  828. // CHECK:STDOUT: fn @G(%x.param: %C.850) {
  829. // CHECK:STDOUT: !entry:
  830. // CHECK:STDOUT: %x.ref: %C.850 = name_ref x, %x
  831. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  832. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.WithSelf.%assoc0 [concrete = constants.%assoc0]
  833. // CHECK:STDOUT: %impl.elem0: %.914 = impl_witness_access constants.%HasF.impl_witness.635, element0 [concrete = constants.%C.as.HasF.impl.F.a6f]
  834. // CHECK:STDOUT: %bound_method.loc15_4: <bound method> = bound_method %x.ref, %impl.elem0
  835. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @C.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%C.as.HasF.impl.F.specific_fn]
  836. // CHECK:STDOUT: %bound_method.loc15_14: <bound method> = bound_method %x.ref, %specific_fn
  837. // CHECK:STDOUT: %C.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc15_14(%x.ref)
  838. // CHECK:STDOUT: return
  839. // CHECK:STDOUT: }
  840. // CHECK:STDOUT:
  841. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%Self) {
  842. // CHECK:STDOUT: !definition:
  843. // CHECK:STDOUT: %Self => constants.%Self
  844. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc
  845. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa
  846. // CHECK:STDOUT: }
  847. // CHECK:STDOUT:
  848. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) {
  849. // CHECK:STDOUT: %Self => constants.%Self
  850. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  851. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
  852. // CHECK:STDOUT: }
  853. // CHECK:STDOUT:
  854. // CHECK:STDOUT: specific @C(constants.%T) {
  855. // CHECK:STDOUT: %T.loc8_9.1 => constants.%T
  856. // CHECK:STDOUT:
  857. // CHECK:STDOUT: !definition:
  858. // CHECK:STDOUT: }
  859. // CHECK:STDOUT:
  860. // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%T) {
  861. // CHECK:STDOUT: %T.loc10_14.1 => constants.%T
  862. // CHECK:STDOUT: %C.loc10_27.1 => constants.%C.5a3
  863. // CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.61b
  864. // CHECK:STDOUT:
  865. // CHECK:STDOUT: !definition:
  866. // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.fb0
  867. // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.f34
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%T) {
  871. // CHECK:STDOUT: %T => constants.%T
  872. // CHECK:STDOUT: %C => constants.%C.5a3
  873. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d5
  874. // CHECK:STDOUT: }
  875. // CHECK:STDOUT:
  876. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%HasF.facet.834) {
  877. // CHECK:STDOUT: !definition:
  878. // CHECK:STDOUT: %Self => constants.%HasF.facet.834
  879. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.796
  880. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.3a2
  881. // CHECK:STDOUT: }
  882. // CHECK:STDOUT:
  883. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet.834) {
  884. // CHECK:STDOUT: %Self => constants.%HasF.facet.834
  885. // CHECK:STDOUT: %Self.binding.as_type => constants.%C.5a3
  886. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d5
  887. // CHECK:STDOUT: }
  888. // CHECK:STDOUT:
  889. // CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
  890. // CHECK:STDOUT: %T.loc8_9.1 => constants.%empty_struct_type
  891. // CHECK:STDOUT:
  892. // CHECK:STDOUT: !definition:
  893. // CHECK:STDOUT: }
  894. // CHECK:STDOUT:
  895. // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%empty_struct_type) {
  896. // CHECK:STDOUT: %T.loc10_14.1 => constants.%empty_struct_type
  897. // CHECK:STDOUT: %C.loc10_27.1 => constants.%C.850
  898. // CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.635
  899. // CHECK:STDOUT:
  900. // CHECK:STDOUT: !definition:
  901. // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.98f
  902. // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.a6f
  903. // CHECK:STDOUT: }
  904. // CHECK:STDOUT:
  905. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%HasF.facet.514) {
  906. // CHECK:STDOUT: !definition:
  907. // CHECK:STDOUT: %Self => constants.%HasF.facet.514
  908. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.753
  909. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.412
  910. // CHECK:STDOUT: }
  911. // CHECK:STDOUT:
  912. // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%empty_struct_type) {
  913. // CHECK:STDOUT: %T => constants.%empty_struct_type
  914. // CHECK:STDOUT: %C => constants.%C.850
  915. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.526
  916. // CHECK:STDOUT:
  917. // CHECK:STDOUT: !definition:
  918. // CHECK:STDOUT: %require_complete => constants.%complete_type
  919. // CHECK:STDOUT: }
  920. // CHECK:STDOUT:
  921. // CHECK:STDOUT: --- deduced_interface_argument.carbon
  922. // CHECK:STDOUT:
  923. // CHECK:STDOUT: constants {
  924. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  925. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  926. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  927. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  928. // CHECK:STDOUT: %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
  929. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  930. // CHECK:STDOUT: %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
  931. // CHECK:STDOUT: %HasF.type.8a4: type = facet_type <@HasF, @HasF(%T)> [symbolic]
  932. // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic]
  933. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1f [symbolic]
  934. // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.binding.as_type [symbolic]
  935. // CHECK:STDOUT: %HasF.WithSelf.F.type.246: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%T, %Self.c1f) [symbolic]
  936. // CHECK:STDOUT: %HasF.WithSelf.F.58b: %HasF.WithSelf.F.type.246 = struct_value () [symbolic]
  937. // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
  938. // CHECK:STDOUT: %assoc0.b54: %HasF.assoc_type.196 = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [symbolic]
  939. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  940. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  941. // CHECK:STDOUT: %HasF.impl_witness.63f: <witness> = impl_witness @empty_struct_type.as.HasF.impl.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T) [symbolic]
  942. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.8a4 [symbolic]
  943. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  944. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.1d0: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T) [symbolic]
  945. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.e82: %empty_struct_type.as.HasF.impl.F.type.1d0 = struct_value () [symbolic]
  946. // CHECK:STDOUT: %HasF.facet.1a2: %HasF.type.8a4 = facet_value %empty_struct_type, (%HasF.impl_witness.63f) [symbolic]
  947. // CHECK:STDOUT: %HasF.WithSelf.F.type.9ca: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%T, %HasF.facet.1a2) [symbolic]
  948. // CHECK:STDOUT: %HasF.WithSelf.F.180: %HasF.WithSelf.F.type.9ca = struct_value () [symbolic]
  949. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  950. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  951. // CHECK:STDOUT: %HasF.type.9d3: type = facet_type <@HasF, @HasF(%empty_struct_type)> [concrete]
  952. // CHECK:STDOUT: %Self.167: %HasF.type.9d3 = symbolic_binding Self, 1 [symbolic]
  953. // CHECK:STDOUT: %HasF.WithSelf.F.type.534: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%empty_struct_type, %Self.c1f) [symbolic]
  954. // CHECK:STDOUT: %HasF.WithSelf.F.df0: %HasF.WithSelf.F.type.534 = struct_value () [symbolic]
  955. // CHECK:STDOUT: %HasF.assoc_type.78b: type = assoc_entity_type @HasF, @HasF(%empty_struct_type) [concrete]
  956. // CHECK:STDOUT: %assoc0.db9: %HasF.assoc_type.78b = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
  957. // CHECK:STDOUT: %HasF.impl_witness.95e: <witness> = impl_witness @empty_struct_type.as.HasF.impl.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete]
  958. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %HasF.type.9d3 [concrete]
  959. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.0e6: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete]
  960. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.a41: %empty_struct_type.as.HasF.impl.F.type.0e6 = struct_value () [concrete]
  961. // CHECK:STDOUT: %HasF.facet.d0d: %HasF.type.9d3 = facet_value %empty_struct_type, (%HasF.impl_witness.95e) [concrete]
  962. // CHECK:STDOUT: %HasF.WithSelf.F.type.0a8: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%empty_struct_type, %HasF.facet.d0d) [concrete]
  963. // CHECK:STDOUT: %HasF.WithSelf.F.650: %HasF.WithSelf.F.type.0a8 = struct_value () [concrete]
  964. // CHECK:STDOUT: %.8c8: type = fn_type_with_self_type %HasF.WithSelf.F.type.0a8, %HasF.facet.d0d [concrete]
  965. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.specific_fn: <specific function> = specific_function %empty_struct_type.as.HasF.impl.F.a41, @empty_struct_type.as.HasF.impl.F(%empty_struct_type) [concrete]
  966. // CHECK:STDOUT: }
  967. // CHECK:STDOUT:
  968. // CHECK:STDOUT: imports {
  969. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  970. // CHECK:STDOUT: import Core//prelude
  971. // CHECK:STDOUT: import Core//prelude/...
  972. // CHECK:STDOUT: }
  973. // CHECK:STDOUT: }
  974. // CHECK:STDOUT:
  975. // CHECK:STDOUT: file {
  976. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  977. // CHECK:STDOUT: .Core = imports.%Core
  978. // CHECK:STDOUT: .HasF = %HasF.decl
  979. // CHECK:STDOUT: .G = %G.decl
  980. // CHECK:STDOUT: }
  981. // CHECK:STDOUT: %Core.import = import Core
  982. // CHECK:STDOUT: %HasF.decl: %HasF.type.ee1 = interface_decl @HasF [concrete = constants.%HasF.generic] {
  983. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  984. // CHECK:STDOUT: } {
  985. // CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] {
  986. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  987. // CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type]
  988. // CHECK:STDOUT: }
  989. // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  990. // CHECK:STDOUT: }
  991. // CHECK:STDOUT: impl_decl @empty_struct_type.as.HasF.impl [concrete] {
  992. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  993. // CHECK:STDOUT: } {
  994. // CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  995. // CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  996. // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  997. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  998. // CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.8a4)]
  999. // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
  1000. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1001. // CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
  1002. // CHECK:STDOUT: }
  1003. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  1004. // CHECK:STDOUT: }
  1005. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  1006. // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern [concrete]
  1007. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = at_binding_pattern x, %x.param_patt [concrete]
  1008. // CHECK:STDOUT: } {
  1009. // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
  1010. // CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = constants.%empty_struct_type] {
  1011. // CHECK:STDOUT: %.loc12_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1012. // CHECK:STDOUT: %.loc12_10.3: type = converted %.loc12_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  1013. // CHECK:STDOUT: }
  1014. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
  1015. // CHECK:STDOUT: }
  1016. // CHECK:STDOUT: }
  1017. // CHECK:STDOUT:
  1018. // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.2: type) {
  1019. // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  1020. // CHECK:STDOUT:
  1021. // CHECK:STDOUT: !definition:
  1022. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
  1023. // CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: interface {
  1026. // CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
  1027. // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
  1028. // CHECK:STDOUT:
  1029. // CHECK:STDOUT: !with Self:
  1030. // CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.WithSelf.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.246) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.WithSelf.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.58b)] {
  1031. // CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = value_param_pattern [concrete]
  1032. // CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = at_binding_pattern self, %self.param_patt [concrete]
  1033. // CHECK:STDOUT: } {
  1034. // CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1035. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1036. // CHECK:STDOUT: %.loc5_14.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)]
  1037. // CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)]
  1038. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1039. // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1040. // CHECK:STDOUT: }
  1041. // CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1042. // CHECK:STDOUT: }
  1043. // CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.b54)]
  1044. // CHECK:STDOUT:
  1045. // CHECK:STDOUT: !members:
  1046. // CHECK:STDOUT: .Self = %Self.loc4_26.1
  1047. // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_21.1
  1048. // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
  1049. // CHECK:STDOUT:
  1050. // CHECK:STDOUT: !requires:
  1051. // CHECK:STDOUT: }
  1052. // CHECK:STDOUT: }
  1053. // CHECK:STDOUT:
  1054. // CHECK:STDOUT: generic impl @empty_struct_type.as.HasF.impl(%T.loc8_14.2: type) {
  1055. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  1056. // CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(%T.loc8_14.1)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.8a4)]
  1057. // CHECK:STDOUT: %HasF.impl_witness.loc8_38.2: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.63f)]
  1058. // CHECK:STDOUT:
  1059. // CHECK:STDOUT: !definition:
  1060. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_36.1 [symbolic = %require_complete (constants.%require_complete)]
  1061. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T.loc8_14.1) [symbolic = %empty_struct_type.as.HasF.impl.F.type (constants.%empty_struct_type.as.HasF.impl.F.type.1d0)]
  1062. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.1d0) = struct_value () [symbolic = %empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.e82)]
  1063. // CHECK:STDOUT:
  1064. // CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.2 {
  1065. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.decl: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.1d0) = fn_decl @empty_struct_type.as.HasF.impl.F [symbolic = @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.e82)] {
  1066. // CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = value_param_pattern [concrete]
  1067. // CHECK:STDOUT: %self.patt: %pattern_type.a96 = at_binding_pattern self, %self.param_patt [concrete]
  1068. // CHECK:STDOUT: } {
  1069. // CHECK:STDOUT: %self.param: %empty_struct_type = value_param call_param0
  1070. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_25.2 [concrete = constants.%empty_struct_type]
  1071. // CHECK:STDOUT: %self: %empty_struct_type = value_binding self, %self.param
  1072. // CHECK:STDOUT: }
  1073. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%empty_struct_type.as.HasF.impl.F.decl), @empty_struct_type.as.HasF.impl [concrete]
  1074. // CHECK:STDOUT: %HasF.impl_witness.loc8_38.1: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.63f)]
  1075. // CHECK:STDOUT:
  1076. // CHECK:STDOUT: !members:
  1077. // CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl
  1078. // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_38.1
  1079. // CHECK:STDOUT: }
  1080. // CHECK:STDOUT: }
  1081. // CHECK:STDOUT:
  1082. // CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) {
  1083. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1084. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
  1085. // CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)]
  1086. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1087. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.969)]
  1088. // CHECK:STDOUT:
  1089. // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type));
  1090. // CHECK:STDOUT: }
  1091. // CHECK:STDOUT:
  1092. // CHECK:STDOUT: generic fn @empty_struct_type.as.HasF.impl.F(@empty_struct_type.as.HasF.impl.%T.loc8_14.2: type) {
  1093. // CHECK:STDOUT: !definition:
  1094. // CHECK:STDOUT:
  1095. // CHECK:STDOUT: fn(%self.param: %empty_struct_type) {
  1096. // CHECK:STDOUT: !entry:
  1097. // CHECK:STDOUT: return
  1098. // CHECK:STDOUT: }
  1099. // CHECK:STDOUT: }
  1100. // CHECK:STDOUT:
  1101. // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
  1102. // CHECK:STDOUT: !entry:
  1103. // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
  1104. // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  1105. // CHECK:STDOUT: %.loc13_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1106. // CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  1107. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%empty_struct_type)> [concrete = constants.%HasF.type.9d3]
  1108. // CHECK:STDOUT: %.loc13_14: %HasF.assoc_type.78b = specific_constant @HasF.WithSelf.%assoc0.loc5_21.1, @HasF.WithSelf(constants.%empty_struct_type, constants.%Self.c1f) [concrete = constants.%assoc0.db9]
  1109. // CHECK:STDOUT: %F.ref: %HasF.assoc_type.78b = name_ref F, %.loc13_14 [concrete = constants.%assoc0.db9]
  1110. // CHECK:STDOUT: %impl.elem0: %.8c8 = impl_witness_access constants.%HasF.impl_witness.95e, element0 [concrete = constants.%empty_struct_type.as.HasF.impl.F.a41]
  1111. // CHECK:STDOUT: %bound_method.loc13_4: <bound method> = bound_method %x.ref, %impl.elem0
  1112. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%empty_struct_type.as.HasF.impl.F.specific_fn]
  1113. // CHECK:STDOUT: %bound_method.loc13_18: <bound method> = bound_method %x.ref, %specific_fn
  1114. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc13_18(%x.ref)
  1115. // CHECK:STDOUT: return
  1116. // CHECK:STDOUT: }
  1117. // CHECK:STDOUT:
  1118. // CHECK:STDOUT: specific @HasF(constants.%T) {
  1119. // CHECK:STDOUT: %T.loc4_16.1 => constants.%T
  1120. // CHECK:STDOUT:
  1121. // CHECK:STDOUT: !definition:
  1122. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1123. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.c1f
  1124. // CHECK:STDOUT: }
  1125. // CHECK:STDOUT:
  1126. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%Self.c1f) {
  1127. // CHECK:STDOUT: !definition:
  1128. // CHECK:STDOUT: %T => constants.%T
  1129. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1130. // CHECK:STDOUT: %Self => constants.%Self.c1f
  1131. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.246
  1132. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.58b
  1133. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196
  1134. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54
  1135. // CHECK:STDOUT: }
  1136. // CHECK:STDOUT:
  1137. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%Self.c1f) {
  1138. // CHECK:STDOUT: %T => constants.%T
  1139. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1140. // CHECK:STDOUT: %Self => constants.%Self.c1f
  1141. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1142. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.969
  1143. // CHECK:STDOUT: }
  1144. // CHECK:STDOUT:
  1145. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%T) {
  1146. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  1147. // CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.8a4
  1148. // CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.63f
  1149. // CHECK:STDOUT:
  1150. // CHECK:STDOUT: !definition:
  1151. // CHECK:STDOUT: %require_complete => constants.%require_complete
  1152. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type => constants.%empty_struct_type.as.HasF.impl.F.type.1d0
  1153. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.e82
  1154. // CHECK:STDOUT: }
  1155. // CHECK:STDOUT:
  1156. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%T) {}
  1157. // CHECK:STDOUT:
  1158. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%HasF.facet.1a2) {
  1159. // CHECK:STDOUT: !definition:
  1160. // CHECK:STDOUT: %T => constants.%T
  1161. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1162. // CHECK:STDOUT: %Self => constants.%HasF.facet.1a2
  1163. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.9ca
  1164. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.180
  1165. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196
  1166. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54
  1167. // CHECK:STDOUT: }
  1168. // CHECK:STDOUT:
  1169. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%HasF.facet.1a2) {
  1170. // CHECK:STDOUT: %T => constants.%T
  1171. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1172. // CHECK:STDOUT: %Self => constants.%HasF.facet.1a2
  1173. // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type
  1174. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96
  1175. // CHECK:STDOUT: }
  1176. // CHECK:STDOUT:
  1177. // CHECK:STDOUT: specific @HasF(constants.%empty_struct_type) {
  1178. // CHECK:STDOUT: %T.loc4_16.1 => constants.%empty_struct_type
  1179. // CHECK:STDOUT:
  1180. // CHECK:STDOUT: !definition:
  1181. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.9d3
  1182. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.167
  1183. // CHECK:STDOUT: }
  1184. // CHECK:STDOUT:
  1185. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%empty_struct_type, constants.%Self.c1f) {
  1186. // CHECK:STDOUT: !definition:
  1187. // CHECK:STDOUT: %T => constants.%empty_struct_type
  1188. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.9d3
  1189. // CHECK:STDOUT: %Self => constants.%Self.c1f
  1190. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.534
  1191. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.df0
  1192. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.78b
  1193. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.db9
  1194. // CHECK:STDOUT: }
  1195. // CHECK:STDOUT:
  1196. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%empty_struct_type) {
  1197. // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
  1198. // CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.9d3
  1199. // CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.95e
  1200. // CHECK:STDOUT:
  1201. // CHECK:STDOUT: !definition:
  1202. // CHECK:STDOUT: %require_complete => constants.%complete_type
  1203. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type => constants.%empty_struct_type.as.HasF.impl.F.type.0e6
  1204. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.a41
  1205. // CHECK:STDOUT: }
  1206. // CHECK:STDOUT:
  1207. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%empty_struct_type, constants.%HasF.facet.d0d) {
  1208. // CHECK:STDOUT: !definition:
  1209. // CHECK:STDOUT: %T => constants.%empty_struct_type
  1210. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.9d3
  1211. // CHECK:STDOUT: %Self => constants.%HasF.facet.d0d
  1212. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.0a8
  1213. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.650
  1214. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.78b
  1215. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.db9
  1216. // CHECK:STDOUT: }
  1217. // CHECK:STDOUT:
  1218. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) {
  1219. // CHECK:STDOUT: !definition:
  1220. // CHECK:STDOUT: }
  1221. // CHECK:STDOUT:
  1222. // CHECK:STDOUT: --- fail_incomplete_deduction.carbon
  1223. // CHECK:STDOUT:
  1224. // CHECK:STDOUT: constants {
  1225. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  1226. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
  1227. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  1228. // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic]
  1229. // CHECK:STDOUT: %HasF.WithSelf.F.type: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%Self) [symbolic]
  1230. // CHECK:STDOUT: %HasF.WithSelf.F: %HasF.WithSelf.F.type = struct_value () [symbolic]
  1231. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  1232. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
  1233. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1234. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1235. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  1236. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1237. // CHECK:STDOUT: %U: type = symbolic_binding U, 1 [symbolic]
  1238. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T, %U) [symbolic]
  1239. // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
  1240. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T, %U) [symbolic]
  1241. // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic]
  1242. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  1243. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1244. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  1245. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  1246. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  1247. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  1248. // CHECK:STDOUT: }
  1249. // CHECK:STDOUT:
  1250. // CHECK:STDOUT: imports {
  1251. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1252. // CHECK:STDOUT: import Core//prelude
  1253. // CHECK:STDOUT: import Core//prelude/...
  1254. // CHECK:STDOUT: }
  1255. // CHECK:STDOUT: }
  1256. // CHECK:STDOUT:
  1257. // CHECK:STDOUT: file {
  1258. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1259. // CHECK:STDOUT: .Core = imports.%Core
  1260. // CHECK:STDOUT: .HasF = %HasF.decl
  1261. // CHECK:STDOUT: .G = %G.decl
  1262. // CHECK:STDOUT: }
  1263. // CHECK:STDOUT: %Core.import = import Core
  1264. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  1265. // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
  1266. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  1267. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete]
  1268. // CHECK:STDOUT: } {
  1269. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.2 [symbolic = %T.loc12_14.1 (constants.%T)]
  1270. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  1271. // CHECK:STDOUT: %.loc12_18.1: type = splice_block %.loc12_18.2 [concrete = type] {
  1272. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1273. // CHECK:STDOUT: %.loc12_18.2: type = type_literal type [concrete = type]
  1274. // CHECK:STDOUT: }
  1275. // CHECK:STDOUT: %T.loc12_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.1 (constants.%T)]
  1276. // CHECK:STDOUT: %.loc12_28.1: type = splice_block %.loc12_28.2 [concrete = type] {
  1277. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1278. // CHECK:STDOUT: %.loc12_28.2: type = type_literal type [concrete = type]
  1279. // CHECK:STDOUT: }
  1280. // CHECK:STDOUT: %U.loc12_24.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
  1281. // CHECK:STDOUT: }
  1282. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  1283. // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern [concrete]
  1284. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = at_binding_pattern x, %x.param_patt [concrete]
  1285. // CHECK:STDOUT: } {
  1286. // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
  1287. // CHECK:STDOUT: %.loc16_10.1: type = splice_block %.loc16_10.3 [concrete = constants.%empty_struct_type] {
  1288. // CHECK:STDOUT: %.loc16_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1289. // CHECK:STDOUT: %.loc16_10.3: type = converted %.loc16_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  1290. // CHECK:STDOUT: }
  1291. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
  1292. // CHECK:STDOUT: }
  1293. // CHECK:STDOUT: }
  1294. // CHECK:STDOUT:
  1295. // CHECK:STDOUT: interface @HasF {
  1296. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  1297. // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
  1298. // CHECK:STDOUT:
  1299. // CHECK:STDOUT: !with Self:
  1300. // CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.WithSelf.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.WithSelf.%HasF.WithSelf.F (constants.%HasF.WithSelf.F)] {
  1301. // CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern [concrete]
  1302. // CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = at_binding_pattern self, %self.param_patt [concrete]
  1303. // CHECK:STDOUT: } {
  1304. // CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1305. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1306. // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
  1307. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1308. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1309. // CHECK:STDOUT: }
  1310. // CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1311. // CHECK:STDOUT: }
  1312. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0]
  1313. // CHECK:STDOUT:
  1314. // CHECK:STDOUT: !members:
  1315. // CHECK:STDOUT: .Self = %Self
  1316. // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0
  1317. // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
  1318. // CHECK:STDOUT:
  1319. // CHECK:STDOUT: !requires:
  1320. // CHECK:STDOUT: }
  1321. // CHECK:STDOUT:
  1322. // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_14.2: type, %U.loc12_24.2: type) {
  1323. // CHECK:STDOUT: %T.loc12_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.1 (constants.%T)]
  1324. // CHECK:STDOUT: %U.loc12_24.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
  1325. // CHECK:STDOUT: %HasF.impl_witness.loc12_44.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_14.1, %U.loc12_24.1) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)]
  1326. // CHECK:STDOUT:
  1327. // CHECK:STDOUT: !definition:
  1328. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc12_14.1, %U.loc12_24.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
  1329. // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)]
  1330. // CHECK:STDOUT:
  1331. // CHECK:STDOUT: impl: %T.ref as %HasF.ref {
  1332. // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] {
  1333. // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [concrete]
  1334. // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern self, %self.param_patt [concrete]
  1335. // CHECK:STDOUT: } {
  1336. // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
  1337. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
  1338. // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
  1339. // CHECK:STDOUT: }
  1340. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @T.as.HasF.impl [concrete]
  1341. // CHECK:STDOUT: %HasF.impl_witness.loc12_44.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)]
  1342. // CHECK:STDOUT:
  1343. // CHECK:STDOUT: !members:
  1344. // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
  1345. // CHECK:STDOUT: witness = <error>
  1346. // CHECK:STDOUT: }
  1347. // CHECK:STDOUT: }
  1348. // CHECK:STDOUT:
  1349. // CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self: %HasF.type) {
  1350. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1351. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1352. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
  1353. // CHECK:STDOUT:
  1354. // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type));
  1355. // CHECK:STDOUT: }
  1356. // CHECK:STDOUT:
  1357. // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_14.2: type, @T.as.HasF.impl.%U.loc12_24.2: type) {
  1358. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1359. // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
  1360. // CHECK:STDOUT:
  1361. // CHECK:STDOUT: !definition:
  1362. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  1363. // CHECK:STDOUT:
  1364. // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
  1365. // CHECK:STDOUT: !entry:
  1366. // CHECK:STDOUT: return
  1367. // CHECK:STDOUT: }
  1368. // CHECK:STDOUT: }
  1369. // CHECK:STDOUT:
  1370. // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
  1371. // CHECK:STDOUT: !entry:
  1372. // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
  1373. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  1374. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.WithSelf.%assoc0 [concrete = constants.%assoc0]
  1375. // CHECK:STDOUT: return
  1376. // CHECK:STDOUT: }
  1377. // CHECK:STDOUT:
  1378. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%Self) {
  1379. // CHECK:STDOUT: !definition:
  1380. // CHECK:STDOUT: %Self => constants.%Self
  1381. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type
  1382. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F
  1383. // CHECK:STDOUT: }
  1384. // CHECK:STDOUT:
  1385. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) {
  1386. // CHECK:STDOUT: %Self => constants.%Self
  1387. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1388. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
  1389. // CHECK:STDOUT: }
  1390. // CHECK:STDOUT:
  1391. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T, constants.%U) {
  1392. // CHECK:STDOUT: %T.loc12_14.1 => constants.%T
  1393. // CHECK:STDOUT: %U.loc12_24.1 => constants.%U
  1394. // CHECK:STDOUT: %HasF.impl_witness.loc12_44.2 => constants.%HasF.impl_witness
  1395. // CHECK:STDOUT:
  1396. // CHECK:STDOUT: !definition:
  1397. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
  1398. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F
  1399. // CHECK:STDOUT: }
  1400. // CHECK:STDOUT:
  1401. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T, constants.%U) {
  1402. // CHECK:STDOUT: %T => constants.%T
  1403. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
  1404. // CHECK:STDOUT: }
  1405. // CHECK:STDOUT:
  1406. // CHECK:STDOUT: --- fail_inconsistent_deduction.carbon
  1407. // CHECK:STDOUT:
  1408. // CHECK:STDOUT: constants {
  1409. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1410. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1411. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  1412. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1413. // CHECK:STDOUT: %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
  1414. // CHECK:STDOUT: %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
  1415. // CHECK:STDOUT: %HasF.type.8a4: type = facet_type <@HasF, @HasF(%T)> [symbolic]
  1416. // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic]
  1417. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1f [symbolic]
  1418. // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.binding.as_type [symbolic]
  1419. // CHECK:STDOUT: %HasF.WithSelf.F.type.246: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%T, %Self.c1f) [symbolic]
  1420. // CHECK:STDOUT: %HasF.WithSelf.F.58b: %HasF.WithSelf.F.type.246 = struct_value () [symbolic]
  1421. // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
  1422. // CHECK:STDOUT: %assoc0.b54: %HasF.assoc_type.196 = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [symbolic]
  1423. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
  1424. // CHECK:STDOUT: %require_complete.5da: <witness> = require_complete_type %HasF.type.8a4 [symbolic]
  1425. // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
  1426. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
  1427. // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic]
  1428. // CHECK:STDOUT: %HasF.facet: %HasF.type.8a4 = facet_value %T, (%HasF.impl_witness) [symbolic]
  1429. // CHECK:STDOUT: %HasF.WithSelf.F.type.997: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%T, %HasF.facet) [symbolic]
  1430. // CHECK:STDOUT: %HasF.WithSelf.F.e20: %HasF.WithSelf.F.type.997 = struct_value () [symbolic]
  1431. // CHECK:STDOUT: %require_complete.944: <witness> = require_complete_type %T [symbolic]
  1432. // CHECK:STDOUT: %A: type = class_type @A [concrete]
  1433. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1434. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1435. // CHECK:STDOUT: %B: type = class_type @B [concrete]
  1436. // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete]
  1437. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  1438. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  1439. // CHECK:STDOUT: %HasF.type.4ef: type = facet_type <@HasF, @HasF(%B)> [concrete]
  1440. // CHECK:STDOUT: %Self.a94: %HasF.type.4ef = symbolic_binding Self, 1 [symbolic]
  1441. // CHECK:STDOUT: %HasF.WithSelf.F.type.39d: type = fn_type @HasF.WithSelf.F, @HasF.WithSelf(%B, %Self.c1f) [symbolic]
  1442. // CHECK:STDOUT: %HasF.WithSelf.F.782: %HasF.WithSelf.F.type.39d = struct_value () [symbolic]
  1443. // CHECK:STDOUT: %HasF.assoc_type.e4f: type = assoc_entity_type @HasF, @HasF(%B) [concrete]
  1444. // CHECK:STDOUT: %assoc0.f91: %HasF.assoc_type.e4f = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
  1445. // CHECK:STDOUT: }
  1446. // CHECK:STDOUT:
  1447. // CHECK:STDOUT: imports {
  1448. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1449. // CHECK:STDOUT: import Core//prelude
  1450. // CHECK:STDOUT: import Core//prelude/...
  1451. // CHECK:STDOUT: }
  1452. // CHECK:STDOUT: }
  1453. // CHECK:STDOUT:
  1454. // CHECK:STDOUT: file {
  1455. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1456. // CHECK:STDOUT: .Core = imports.%Core
  1457. // CHECK:STDOUT: .HasF = %HasF.decl
  1458. // CHECK:STDOUT: .A = %A.decl
  1459. // CHECK:STDOUT: .B = %B.decl
  1460. // CHECK:STDOUT: .G = %G.decl
  1461. // CHECK:STDOUT: }
  1462. // CHECK:STDOUT: %Core.import = import Core
  1463. // CHECK:STDOUT: %HasF.decl: %HasF.type.ee1 = interface_decl @HasF [concrete = constants.%HasF.generic] {
  1464. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  1465. // CHECK:STDOUT: } {
  1466. // CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.2 [concrete = type] {
  1467. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1468. // CHECK:STDOUT: %.loc4_20.2: type = type_literal type [concrete = type]
  1469. // CHECK:STDOUT: }
  1470. // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  1471. // CHECK:STDOUT: }
  1472. // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
  1473. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  1474. // CHECK:STDOUT: } {
  1475. // CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  1476. // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  1477. // CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  1478. // CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.8a4)]
  1479. // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] {
  1480. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1481. // CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type]
  1482. // CHECK:STDOUT: }
  1483. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  1484. // CHECK:STDOUT: }
  1485. // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
  1486. // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {}
  1487. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  1488. // CHECK:STDOUT: %x.param_patt: %pattern_type.1ab = value_param_pattern [concrete]
  1489. // CHECK:STDOUT: %x.patt: %pattern_type.1ab = at_binding_pattern x, %x.param_patt [concrete]
  1490. // CHECK:STDOUT: } {
  1491. // CHECK:STDOUT: %x.param: %A = value_param call_param0
  1492. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
  1493. // CHECK:STDOUT: %x: %A = value_binding x, %x.param
  1494. // CHECK:STDOUT: }
  1495. // CHECK:STDOUT: }
  1496. // CHECK:STDOUT:
  1497. // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.2: type) {
  1498. // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  1499. // CHECK:STDOUT:
  1500. // CHECK:STDOUT: !definition:
  1501. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
  1502. // CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
  1503. // CHECK:STDOUT:
  1504. // CHECK:STDOUT: interface {
  1505. // CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
  1506. // CHECK:STDOUT: %HasF.WithSelf.decl = interface_with_self_decl @HasF [concrete]
  1507. // CHECK:STDOUT:
  1508. // CHECK:STDOUT: !with Self:
  1509. // CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.WithSelf.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.246) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.WithSelf.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.58b)] {
  1510. // CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = value_param_pattern [concrete]
  1511. // CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = at_binding_pattern self, %self.param_patt [concrete]
  1512. // CHECK:STDOUT: } {
  1513. // CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1514. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1515. // CHECK:STDOUT: %.loc5_14.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)]
  1516. // CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)]
  1517. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1518. // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1519. // CHECK:STDOUT: }
  1520. // CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1521. // CHECK:STDOUT: }
  1522. // CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.WithSelf.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.b54)]
  1523. // CHECK:STDOUT:
  1524. // CHECK:STDOUT: !members:
  1525. // CHECK:STDOUT: .Self = %Self.loc4_26.1
  1526. // CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0.loc5_21.1
  1527. // CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
  1528. // CHECK:STDOUT:
  1529. // CHECK:STDOUT: !requires:
  1530. // CHECK:STDOUT: }
  1531. // CHECK:STDOUT: }
  1532. // CHECK:STDOUT:
  1533. // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_14.2: type) {
  1534. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  1535. // CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(%T.loc8_14.1)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.8a4)]
  1536. // CHECK:STDOUT: %HasF.impl_witness.loc8_37.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)]
  1537. // CHECK:STDOUT:
  1538. // CHECK:STDOUT: !definition:
  1539. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete.5da)]
  1540. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
  1541. // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)]
  1542. // CHECK:STDOUT:
  1543. // CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.2 {
  1544. // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] {
  1545. // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern [concrete]
  1546. // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = at_binding_pattern self, %self.param_patt [concrete]
  1547. // CHECK:STDOUT: } {
  1548. // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
  1549. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_24 [symbolic = %T (constants.%T)]
  1550. // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
  1551. // CHECK:STDOUT: }
  1552. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
  1553. // CHECK:STDOUT: %HasF.impl_witness.loc8_37.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)]
  1554. // CHECK:STDOUT:
  1555. // CHECK:STDOUT: !members:
  1556. // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
  1557. // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1
  1558. // CHECK:STDOUT: }
  1559. // CHECK:STDOUT: }
  1560. // CHECK:STDOUT:
  1561. // CHECK:STDOUT: class @A {
  1562. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1563. // CHECK:STDOUT: complete_type_witness = %complete_type
  1564. // CHECK:STDOUT:
  1565. // CHECK:STDOUT: !members:
  1566. // CHECK:STDOUT: .Self = constants.%A
  1567. // CHECK:STDOUT: }
  1568. // CHECK:STDOUT:
  1569. // CHECK:STDOUT: class @B {
  1570. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1571. // CHECK:STDOUT: complete_type_witness = %complete_type
  1572. // CHECK:STDOUT:
  1573. // CHECK:STDOUT: !members:
  1574. // CHECK:STDOUT: .Self = constants.%B
  1575. // CHECK:STDOUT: }
  1576. // CHECK:STDOUT:
  1577. // CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) {
  1578. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1579. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
  1580. // CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)]
  1581. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1582. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.969)]
  1583. // CHECK:STDOUT:
  1584. // CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type));
  1585. // CHECK:STDOUT: }
  1586. // CHECK:STDOUT:
  1587. // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
  1588. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1589. // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
  1590. // CHECK:STDOUT:
  1591. // CHECK:STDOUT: !definition:
  1592. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.944)]
  1593. // CHECK:STDOUT:
  1594. // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
  1595. // CHECK:STDOUT: !entry:
  1596. // CHECK:STDOUT: return
  1597. // CHECK:STDOUT: }
  1598. // CHECK:STDOUT: }
  1599. // CHECK:STDOUT:
  1600. // CHECK:STDOUT: fn @G(%x.param: %A) {
  1601. // CHECK:STDOUT: !entry:
  1602. // CHECK:STDOUT: %x.ref: %A = name_ref x, %x
  1603. // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  1604. // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
  1605. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%B)> [concrete = constants.%HasF.type.4ef]
  1606. // CHECK:STDOUT: %.loc22: %HasF.assoc_type.e4f = specific_constant @HasF.WithSelf.%assoc0.loc5_21.1, @HasF.WithSelf(constants.%B, constants.%Self.c1f) [concrete = constants.%assoc0.f91]
  1607. // CHECK:STDOUT: %F.ref: %HasF.assoc_type.e4f = name_ref F, %.loc22 [concrete = constants.%assoc0.f91]
  1608. // CHECK:STDOUT: return
  1609. // CHECK:STDOUT: }
  1610. // CHECK:STDOUT:
  1611. // CHECK:STDOUT: specific @HasF(constants.%T) {
  1612. // CHECK:STDOUT: %T.loc4_16.1 => constants.%T
  1613. // CHECK:STDOUT:
  1614. // CHECK:STDOUT: !definition:
  1615. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1616. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.c1f
  1617. // CHECK:STDOUT: }
  1618. // CHECK:STDOUT:
  1619. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%Self.c1f) {
  1620. // CHECK:STDOUT: !definition:
  1621. // CHECK:STDOUT: %T => constants.%T
  1622. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1623. // CHECK:STDOUT: %Self => constants.%Self.c1f
  1624. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.246
  1625. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.58b
  1626. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196
  1627. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54
  1628. // CHECK:STDOUT: }
  1629. // CHECK:STDOUT:
  1630. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%Self.c1f) {
  1631. // CHECK:STDOUT: %T => constants.%T
  1632. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1633. // CHECK:STDOUT: %Self => constants.%Self.c1f
  1634. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1635. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.969
  1636. // CHECK:STDOUT: }
  1637. // CHECK:STDOUT:
  1638. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
  1639. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  1640. // CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.8a4
  1641. // CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness
  1642. // CHECK:STDOUT:
  1643. // CHECK:STDOUT: !definition:
  1644. // CHECK:STDOUT: %require_complete => constants.%require_complete.5da
  1645. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
  1646. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F
  1647. // CHECK:STDOUT: }
  1648. // CHECK:STDOUT:
  1649. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T) {
  1650. // CHECK:STDOUT: %T => constants.%T
  1651. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
  1652. // CHECK:STDOUT: }
  1653. // CHECK:STDOUT:
  1654. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%T, constants.%HasF.facet) {
  1655. // CHECK:STDOUT: !definition:
  1656. // CHECK:STDOUT: %T => constants.%T
  1657. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1658. // CHECK:STDOUT: %Self => constants.%HasF.facet
  1659. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.997
  1660. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.e20
  1661. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196
  1662. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54
  1663. // CHECK:STDOUT: }
  1664. // CHECK:STDOUT:
  1665. // CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%HasF.facet) {
  1666. // CHECK:STDOUT: %T => constants.%T
  1667. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
  1668. // CHECK:STDOUT: %Self => constants.%HasF.facet
  1669. // CHECK:STDOUT: %Self.binding.as_type => constants.%T
  1670. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
  1671. // CHECK:STDOUT: }
  1672. // CHECK:STDOUT:
  1673. // CHECK:STDOUT: specific @HasF(constants.%B) {
  1674. // CHECK:STDOUT: %T.loc4_16.1 => constants.%B
  1675. // CHECK:STDOUT:
  1676. // CHECK:STDOUT: !definition:
  1677. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.4ef
  1678. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.a94
  1679. // CHECK:STDOUT: }
  1680. // CHECK:STDOUT:
  1681. // CHECK:STDOUT: specific @HasF.WithSelf(constants.%B, constants.%Self.c1f) {
  1682. // CHECK:STDOUT: !definition:
  1683. // CHECK:STDOUT: %T => constants.%B
  1684. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.4ef
  1685. // CHECK:STDOUT: %Self => constants.%Self.c1f
  1686. // CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.39d
  1687. // CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.782
  1688. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.e4f
  1689. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.f91
  1690. // CHECK:STDOUT: }
  1691. // CHECK:STDOUT: