generic.carbon 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516
  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[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[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[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[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[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.e682: type = pattern_type %Self.binding.as_type [symbolic]
  104. // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
  105. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  106. // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
  107. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  108. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.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: %T: type = symbolic_binding T, 0 [symbolic]
  112. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  113. // CHECK:STDOUT: %HasF.impl_witness.bdb: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
  114. // CHECK:STDOUT: %pattern_type.e683: type = pattern_type %T [symbolic]
  115. // CHECK:STDOUT: %T.as.HasF.impl.F.type.92f: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
  116. // CHECK:STDOUT: %T.as.HasF.impl.F.ed9: %T.as.HasF.impl.F.type.92f = struct_value () [symbolic]
  117. // CHECK:STDOUT: %HasF.facet.aaf: %HasF.type = facet_value %T, (%HasF.impl_witness.bdb) [symbolic]
  118. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  119. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  120. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  121. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  122. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  123. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  124. // CHECK:STDOUT: %HasF.impl_witness.22a: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%empty_struct_type) [concrete]
  125. // CHECK:STDOUT: %T.as.HasF.impl.F.type.ce2: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%empty_struct_type) [concrete]
  126. // CHECK:STDOUT: %T.as.HasF.impl.F.80a: %T.as.HasF.impl.F.type.ce2 = struct_value () [concrete]
  127. // CHECK:STDOUT: %HasF.facet.040: %HasF.type = facet_value %empty_struct_type, (%HasF.impl_witness.22a) [concrete]
  128. // CHECK:STDOUT: %.f99: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.040 [concrete]
  129. // CHECK:STDOUT: %T.as.HasF.impl.F.specific_fn: <specific function> = specific_function %T.as.HasF.impl.F.80a, @T.as.HasF.impl.F(%empty_struct_type) [concrete]
  130. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  131. // CHECK:STDOUT: }
  132. // CHECK:STDOUT:
  133. // CHECK:STDOUT: imports {
  134. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  135. // CHECK:STDOUT: import Core//prelude
  136. // CHECK:STDOUT: import Core//prelude/...
  137. // CHECK:STDOUT: }
  138. // CHECK:STDOUT: }
  139. // CHECK:STDOUT:
  140. // CHECK:STDOUT: file {
  141. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  142. // CHECK:STDOUT: .Core = imports.%Core
  143. // CHECK:STDOUT: .HasF = %HasF.decl
  144. // CHECK:STDOUT: .G = %G.decl
  145. // CHECK:STDOUT: }
  146. // CHECK:STDOUT: %Core.import = import Core
  147. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  148. // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
  149. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  150. // CHECK:STDOUT: } {
  151. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  152. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  153. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  154. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  155. // CHECK:STDOUT: }
  156. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@T.as.HasF.impl.%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
  157. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = @T.as.HasF.impl.%HasF.impl_witness (constants.%HasF.impl_witness.bdb)]
  158. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  159. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
  160. // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern %x.patt, call_param0 [concrete]
  161. // CHECK:STDOUT: } {
  162. // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
  163. // CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = constants.%empty_struct_type] {
  164. // CHECK:STDOUT: %.loc12_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  165. // CHECK:STDOUT: %.loc12_10.3: type = converted %.loc12_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
  168. // CHECK:STDOUT: }
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT:
  171. // CHECK:STDOUT: interface @HasF {
  172. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  173. // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
  174. // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.e682) = value_binding_pattern self [concrete]
  175. // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.e682) = value_param_pattern %self.patt, call_param0 [concrete]
  176. // CHECK:STDOUT: } {
  177. // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  178. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  179. // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
  180. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  181. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  184. // CHECK:STDOUT: }
  185. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
  186. // CHECK:STDOUT:
  187. // CHECK:STDOUT: !members:
  188. // CHECK:STDOUT: .Self = %Self
  189. // CHECK:STDOUT: .F = %assoc0
  190. // CHECK:STDOUT: witness = (%HasF.F.decl)
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: !requires:
  193. // CHECK:STDOUT: }
  194. // CHECK:STDOUT:
  195. // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_14.2: type) {
  196. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  197. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.bdb)]
  198. // CHECK:STDOUT:
  199. // CHECK:STDOUT: !definition:
  200. // 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.92f)]
  201. // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type.92f) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F.ed9)]
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: impl: %T.ref as %HasF.ref {
  204. // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type.92f) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F.ed9)] {
  205. // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.e683) = value_binding_pattern self [concrete]
  206. // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.e683) = value_param_pattern %self.patt, call_param0 [concrete]
  207. // CHECK:STDOUT: } {
  208. // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
  209. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
  210. // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
  211. // CHECK:STDOUT: }
  212. // CHECK:STDOUT:
  213. // CHECK:STDOUT: !members:
  214. // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
  215. // CHECK:STDOUT: witness = file.%HasF.impl_witness
  216. // CHECK:STDOUT: }
  217. // CHECK:STDOUT: }
  218. // CHECK:STDOUT:
  219. // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
  220. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  221. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  222. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.e682)]
  223. // CHECK:STDOUT:
  224. // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT:
  227. // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
  228. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  229. // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.e683)]
  230. // CHECK:STDOUT:
  231. // CHECK:STDOUT: !definition:
  232. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
  235. // CHECK:STDOUT: !entry:
  236. // CHECK:STDOUT: return
  237. // CHECK:STDOUT: }
  238. // CHECK:STDOUT: }
  239. // CHECK:STDOUT:
  240. // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
  241. // CHECK:STDOUT: !entry:
  242. // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
  243. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  244. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0]
  245. // CHECK:STDOUT: %impl.elem0: %.f99 = impl_witness_access constants.%HasF.impl_witness.22a, element0 [concrete = constants.%T.as.HasF.impl.F.80a]
  246. // CHECK:STDOUT: %bound_method.loc13_4: <bound method> = bound_method %x.ref, %impl.elem0
  247. // 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]
  248. // CHECK:STDOUT: %bound_method.loc13_14: <bound method> = bound_method %x.ref, %specific_fn
  249. // CHECK:STDOUT: %T.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc13_14(%x.ref)
  250. // CHECK:STDOUT: return
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: specific @HasF.F(constants.%Self) {
  254. // CHECK:STDOUT: %Self => constants.%Self
  255. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  256. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e682
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
  260. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  261. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.bdb
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: !definition:
  264. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.92f
  265. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.ed9
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT:
  268. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T) {
  269. // CHECK:STDOUT: %T => constants.%T
  270. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e683
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.aaf) {
  274. // CHECK:STDOUT: %Self => constants.%HasF.facet.aaf
  275. // CHECK:STDOUT: %Self.binding.as_type => constants.%T
  276. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e683
  277. // CHECK:STDOUT: }
  278. // CHECK:STDOUT:
  279. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%empty_struct_type) {
  280. // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
  281. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.22a
  282. // CHECK:STDOUT:
  283. // CHECK:STDOUT: !definition:
  284. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.ce2
  285. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.80a
  286. // CHECK:STDOUT: }
  287. // CHECK:STDOUT:
  288. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%empty_struct_type) {
  289. // CHECK:STDOUT: %T => constants.%empty_struct_type
  290. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: !definition:
  293. // CHECK:STDOUT: %require_complete => constants.%complete_type
  294. // CHECK:STDOUT: }
  295. // CHECK:STDOUT:
  296. // CHECK:STDOUT: --- deduced_type_subst.carbon
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: constants {
  299. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  300. // CHECK:STDOUT: %Self.9a7: %HasF.type = symbolic_binding Self, 0 [symbolic]
  301. // CHECK:STDOUT: %Self.binding.as_type.07b: type = symbolic_binding_type Self, 0, %Self.9a7 [symbolic]
  302. // CHECK:STDOUT: %pattern_type.e68: type = pattern_type %Self.binding.as_type.07b [symbolic]
  303. // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
  304. // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
  305. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  306. // CHECK:STDOUT: %assoc0.97a: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
  307. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  308. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  309. // CHECK:STDOUT: %T.d9f: type = symbolic_binding T, 0 [symbolic]
  310. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  311. // CHECK:STDOUT: %ptr.4f0: type = ptr_type %T.d9f [symbolic]
  312. // CHECK:STDOUT: %HasF.impl_witness.c1a: <witness> = impl_witness file.%HasF.impl_witness_table, @ptr.as.HasF.impl(%T.d9f) [symbolic]
  313. // CHECK:STDOUT: %pattern_type.a60: type = pattern_type %ptr.4f0 [symbolic]
  314. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.dd9: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.d9f) [symbolic]
  315. // CHECK:STDOUT: %ptr.as.HasF.impl.F.d3c: %ptr.as.HasF.impl.F.type.dd9 = struct_value () [symbolic]
  316. // CHECK:STDOUT: %HasF.facet.a17: %HasF.type = facet_value %ptr.4f0, (%HasF.impl_witness.c1a) [symbolic]
  317. // CHECK:STDOUT: %require_complete.482: <witness> = require_complete_type %ptr.4f0 [symbolic]
  318. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  319. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  320. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.75b: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.d9f) [symbolic]
  321. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.692: %ptr.as.Copy.impl.Op.type.75b = struct_value () [symbolic]
  322. // CHECK:STDOUT: %Copy.lookup_impl_witness.c66: <witness> = lookup_impl_witness %ptr.4f0, @Copy [symbolic]
  323. // CHECK:STDOUT: %Copy.facet.747: %Copy.type = facet_value %ptr.4f0, (%Copy.lookup_impl_witness.c66) [symbolic]
  324. // CHECK:STDOUT: %.89d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.747 [symbolic]
  325. // CHECK:STDOUT: %impl.elem0.928: %.89d = impl_witness_access %Copy.lookup_impl_witness.c66, element0 [symbolic]
  326. // CHECK:STDOUT: %specific_impl_fn.6a1: <specific function> = specific_impl_function %impl.elem0.928, @Copy.Op(%Copy.facet.747) [symbolic]
  327. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  328. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  329. // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete]
  330. // CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %ptr.c28 [concrete]
  331. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  332. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  333. // CHECK:STDOUT: %HasF.impl_witness.825: <witness> = impl_witness file.%HasF.impl_witness_table, @ptr.as.HasF.impl(%empty_struct_type) [concrete]
  334. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.4d2: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%empty_struct_type) [concrete]
  335. // CHECK:STDOUT: %ptr.as.HasF.impl.F.b12: %ptr.as.HasF.impl.F.type.4d2 = struct_value () [concrete]
  336. // CHECK:STDOUT: %HasF.facet.10f: %HasF.type = facet_value %ptr.c28, (%HasF.impl_witness.825) [concrete]
  337. // CHECK:STDOUT: %.22b: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.10f [concrete]
  338. // CHECK:STDOUT: %ptr.as.HasF.impl.F.specific_fn: <specific function> = specific_function %ptr.as.HasF.impl.F.b12, @ptr.as.HasF.impl.F(%empty_struct_type) [concrete]
  339. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %ptr.c28 [concrete]
  340. // CHECK:STDOUT: %Copy.impl_witness.433: <witness> = impl_witness imports.%Copy.impl_witness_table.67d, @ptr.as.Copy.impl(%empty_struct_type) [concrete]
  341. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.424: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%empty_struct_type) [concrete]
  342. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.15e: %ptr.as.Copy.impl.Op.type.424 = struct_value () [concrete]
  343. // CHECK:STDOUT: %Copy.facet.48c: %Copy.type = facet_value %ptr.c28, (%Copy.impl_witness.433) [concrete]
  344. // CHECK:STDOUT: %.fb0: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.48c [concrete]
  345. // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.15e, @ptr.as.Copy.impl.Op(%empty_struct_type) [concrete]
  346. // CHECK:STDOUT: }
  347. // CHECK:STDOUT:
  348. // CHECK:STDOUT: imports {
  349. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  350. // CHECK:STDOUT: .Copy = %Core.Copy
  351. // CHECK:STDOUT: import Core//prelude
  352. // CHECK:STDOUT: import Core//prelude/...
  353. // CHECK:STDOUT: }
  354. // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
  355. // CHECK:STDOUT: %Core.import_ref.659: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.75b) = 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.692)]
  356. // CHECK:STDOUT: %Copy.impl_witness_table.67d = impl_witness_table (%Core.import_ref.659), @ptr.as.Copy.impl [concrete]
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT:
  359. // CHECK:STDOUT: file {
  360. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  361. // CHECK:STDOUT: .Core = imports.%Core
  362. // CHECK:STDOUT: .HasF = %HasF.decl
  363. // CHECK:STDOUT: .G = %G.decl
  364. // CHECK:STDOUT: }
  365. // CHECK:STDOUT: %Core.import = import Core
  366. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  367. // CHECK:STDOUT: impl_decl @ptr.as.HasF.impl [concrete] {
  368. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  369. // CHECK:STDOUT: } {
  370. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T.d9f)]
  371. // CHECK:STDOUT: %ptr.loc8_25.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_25.1 (constants.%ptr.4f0)]
  372. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  373. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  374. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T.d9f)]
  375. // CHECK:STDOUT: }
  376. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@ptr.as.HasF.impl.%ptr.as.HasF.impl.F.decl), @ptr.as.HasF.impl [concrete]
  377. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.d9f) [symbolic = @ptr.as.HasF.impl.%HasF.impl_witness (constants.%HasF.impl_witness.c1a)]
  378. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  379. // CHECK:STDOUT: %x.patt: %pattern_type.1cc = value_binding_pattern x [concrete]
  380. // CHECK:STDOUT: %x.param_patt: %pattern_type.1cc = value_param_pattern %x.patt, call_param0 [concrete]
  381. // CHECK:STDOUT: %return.patt: %pattern_type.1cc = return_slot_pattern [concrete]
  382. // CHECK:STDOUT: %return.param_patt: %pattern_type.1cc = out_param_pattern %return.patt, call_param1 [concrete]
  383. // CHECK:STDOUT: } {
  384. // CHECK:STDOUT: %.loc12_18: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  385. // CHECK:STDOUT: %.loc12_19: type = converted %.loc12_18, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  386. // CHECK:STDOUT: %ptr.loc12_19: type = ptr_type %.loc12_19 [concrete = constants.%ptr.c28]
  387. // CHECK:STDOUT: %x.param: %ptr.c28 = value_param call_param0
  388. // CHECK:STDOUT: %.loc12_11.1: type = splice_block %ptr.loc12_11 [concrete = constants.%ptr.c28] {
  389. // CHECK:STDOUT: %.loc12_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  390. // CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  391. // CHECK:STDOUT: %ptr.loc12_11: type = ptr_type %.loc12_11.2 [concrete = constants.%ptr.c28]
  392. // CHECK:STDOUT: }
  393. // CHECK:STDOUT: %x: %ptr.c28 = value_binding x, %x.param
  394. // CHECK:STDOUT: %return.param: ref %ptr.c28 = out_param call_param1
  395. // CHECK:STDOUT: %return: ref %ptr.c28 = return_slot %return.param
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: interface @HasF {
  400. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.9a7]
  401. // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
  402. // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.e68) = value_binding_pattern self [concrete]
  403. // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.e68) = value_param_pattern %self.patt, call_param0 [concrete]
  404. // CHECK:STDOUT: %return.patt: @HasF.F.%pattern_type (%pattern_type.e68) = return_slot_pattern [concrete]
  405. // CHECK:STDOUT: %return.param_patt: @HasF.F.%pattern_type (%pattern_type.e68) = out_param_pattern %return.patt, call_param1 [concrete]
  406. // CHECK:STDOUT: } {
  407. // CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.9a7)]
  408. // 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.07b)]
  409. // CHECK:STDOUT: %.loc5_25: type = converted %Self.ref.loc5_25, %Self.as_type.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)]
  410. // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.07b) = value_param call_param0
  411. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] {
  412. // CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.9a7)]
  413. // 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.07b)]
  414. // 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.07b)]
  415. // CHECK:STDOUT: }
  416. // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.07b) = value_binding self, %self.param
  417. // CHECK:STDOUT: %return.param: ref @HasF.F.%Self.binding.as_type (%Self.binding.as_type.07b) = out_param call_param1
  418. // CHECK:STDOUT: %return: ref @HasF.F.%Self.binding.as_type (%Self.binding.as_type.07b) = return_slot %return.param
  419. // CHECK:STDOUT: }
  420. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0.97a]
  421. // CHECK:STDOUT:
  422. // CHECK:STDOUT: !members:
  423. // CHECK:STDOUT: .Self = %Self
  424. // CHECK:STDOUT: .F = %assoc0
  425. // CHECK:STDOUT: witness = (%HasF.F.decl)
  426. // CHECK:STDOUT:
  427. // CHECK:STDOUT: !requires:
  428. // CHECK:STDOUT: }
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: generic impl @ptr.as.HasF.impl(%T.loc8_14.2: type) {
  431. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T.d9f)]
  432. // CHECK:STDOUT: %ptr.loc8_25.1: type = ptr_type %T.loc8_14.1 [symbolic = %ptr.loc8_25.1 (constants.%ptr.4f0)]
  433. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.c1a)]
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: !definition:
  436. // 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.dd9)]
  437. // CHECK:STDOUT: %ptr.as.HasF.impl.F: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.dd9) = struct_value () [symbolic = %ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.d3c)]
  438. // CHECK:STDOUT:
  439. // CHECK:STDOUT: impl: %ptr.loc8_25.2 as %HasF.ref {
  440. // CHECK:STDOUT: %ptr.as.HasF.impl.F.decl: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.dd9) = fn_decl @ptr.as.HasF.impl.F [symbolic = @ptr.as.HasF.impl.%ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.d3c)] {
  441. // CHECK:STDOUT: %self.patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.a60) = value_binding_pattern self [concrete]
  442. // CHECK:STDOUT: %self.param_patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.a60) = value_param_pattern %self.patt, call_param0 [concrete]
  443. // CHECK:STDOUT: %return.patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.a60) = return_slot_pattern [concrete]
  444. // CHECK:STDOUT: %return.param_patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.a60) = out_param_pattern %return.patt, call_param1 [concrete]
  445. // CHECK:STDOUT: } {
  446. // CHECK:STDOUT: %T.ref: type = name_ref T, @ptr.as.HasF.impl.%T.loc8_14.2 [symbolic = %T (constants.%T.d9f)]
  447. // CHECK:STDOUT: %ptr.loc9_26: type = ptr_type %T.ref [symbolic = %ptr.loc9_14 (constants.%ptr.4f0)]
  448. // CHECK:STDOUT: %self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) = value_param call_param0
  449. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_25.2 [symbolic = %ptr.loc9_14 (constants.%ptr.4f0)]
  450. // CHECK:STDOUT: %self: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) = value_binding self, %self.param
  451. // CHECK:STDOUT: %return.param: ref @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) = out_param call_param1
  452. // CHECK:STDOUT: %return: ref @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) = return_slot %return.param
  453. // CHECK:STDOUT: }
  454. // CHECK:STDOUT:
  455. // CHECK:STDOUT: !members:
  456. // CHECK:STDOUT: .T = <poisoned>
  457. // CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl
  458. // CHECK:STDOUT: witness = file.%HasF.impl_witness
  459. // CHECK:STDOUT: }
  460. // CHECK:STDOUT: }
  461. // CHECK:STDOUT:
  462. // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
  463. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.9a7)]
  464. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)]
  465. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.e68)]
  466. // CHECK:STDOUT:
  467. // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.07b)) -> @HasF.F.%Self.binding.as_type (%Self.binding.as_type.07b);
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT:
  470. // CHECK:STDOUT: generic fn @ptr.as.HasF.impl.F(@ptr.as.HasF.impl.%T.loc8_14.2: type) {
  471. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.d9f)]
  472. // CHECK:STDOUT: %ptr.loc9_14: type = ptr_type %T [symbolic = %ptr.loc9_14 (constants.%ptr.4f0)]
  473. // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc9_14 [symbolic = %pattern_type (constants.%pattern_type.a60)]
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: !definition:
  476. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc9_14 [symbolic = %require_complete (constants.%require_complete.482)]
  477. // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc9_14, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.c66)]
  478. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc9_14, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.747)]
  479. // CHECK:STDOUT: %.loc9_37.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_37.2 (constants.%.89d)]
  480. // CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.89d) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.928)]
  481. // CHECK:STDOUT: %specific_impl_fn.loc9_37.2: <specific function> = specific_impl_function %impl.elem0.loc9_37.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.6a1)]
  482. // CHECK:STDOUT:
  483. // CHECK:STDOUT: fn(%self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0)) -> @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) {
  484. // CHECK:STDOUT: !entry:
  485. // CHECK:STDOUT: %self.ref: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) = name_ref self, %self
  486. // CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.89d) = impl_witness_access constants.%Copy.lookup_impl_witness.c66, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.928)]
  487. // CHECK:STDOUT: %bound_method.loc9_37.1: <bound method> = bound_method %self.ref, %impl.elem0.loc9_37.1
  488. // CHECK:STDOUT: %specific_impl_fn.loc9_37.1: <specific function> = specific_impl_function %impl.elem0.loc9_37.1, @Copy.Op(constants.%Copy.facet.747) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.6a1)]
  489. // CHECK:STDOUT: %bound_method.loc9_37.2: <bound method> = bound_method %self.ref, %specific_impl_fn.loc9_37.1
  490. // CHECK:STDOUT: %.loc9_37.1: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.4f0) = call %bound_method.loc9_37.2(%self.ref)
  491. // CHECK:STDOUT: return %.loc9_37.1 to %return
  492. // CHECK:STDOUT: }
  493. // CHECK:STDOUT: }
  494. // CHECK:STDOUT:
  495. // CHECK:STDOUT: fn @G(%x.param: %ptr.c28) -> %ptr.c28 {
  496. // CHECK:STDOUT: !entry:
  497. // CHECK:STDOUT: %x.ref: %ptr.c28 = name_ref x, %x
  498. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  499. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.97a]
  500. // CHECK:STDOUT: %impl.elem0: %.22b = impl_witness_access constants.%HasF.impl_witness.825, element0 [concrete = constants.%ptr.as.HasF.impl.F.b12]
  501. // CHECK:STDOUT: %bound_method.loc13_11: <bound method> = bound_method %x.ref, %impl.elem0
  502. // 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]
  503. // CHECK:STDOUT: %bound_method.loc13_21: <bound method> = bound_method %x.ref, %specific_fn
  504. // CHECK:STDOUT: %ptr.as.HasF.impl.F.call: init %ptr.c28 = call %bound_method.loc13_21(%x.ref)
  505. // CHECK:STDOUT: return %ptr.as.HasF.impl.F.call to %return
  506. // CHECK:STDOUT: }
  507. // CHECK:STDOUT:
  508. // CHECK:STDOUT: specific @HasF.F(constants.%Self.9a7) {
  509. // CHECK:STDOUT: %Self => constants.%Self.9a7
  510. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.07b
  511. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e68
  512. // CHECK:STDOUT: }
  513. // CHECK:STDOUT:
  514. // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%T.d9f) {
  515. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T.d9f
  516. // CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.4f0
  517. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.c1a
  518. // CHECK:STDOUT:
  519. // CHECK:STDOUT: !definition:
  520. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.dd9
  521. // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.d3c
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT:
  524. // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%T.d9f) {
  525. // CHECK:STDOUT: %T => constants.%T.d9f
  526. // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.4f0
  527. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a60
  528. // CHECK:STDOUT: }
  529. // CHECK:STDOUT:
  530. // CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.a17) {
  531. // CHECK:STDOUT: %Self => constants.%HasF.facet.a17
  532. // CHECK:STDOUT: %Self.binding.as_type => constants.%ptr.4f0
  533. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a60
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%empty_struct_type) {
  537. // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
  538. // CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.c28
  539. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.825
  540. // CHECK:STDOUT:
  541. // CHECK:STDOUT: !definition:
  542. // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.4d2
  543. // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.b12
  544. // CHECK:STDOUT: }
  545. // CHECK:STDOUT:
  546. // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%empty_struct_type) {
  547. // CHECK:STDOUT: %T => constants.%empty_struct_type
  548. // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.c28
  549. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1cc
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: !definition:
  552. // CHECK:STDOUT: %require_complete => constants.%complete_type
  553. // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.433
  554. // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.48c
  555. // CHECK:STDOUT: %.loc9_37.2 => constants.%.fb0
  556. // CHECK:STDOUT: %impl.elem0.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.15e
  557. // CHECK:STDOUT: %specific_impl_fn.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
  558. // CHECK:STDOUT: }
  559. // CHECK:STDOUT:
  560. // CHECK:STDOUT: --- deduced_type_argument.carbon
  561. // CHECK:STDOUT:
  562. // CHECK:STDOUT: constants {
  563. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  564. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
  565. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  566. // CHECK:STDOUT: %pattern_type.e68: type = pattern_type %Self.binding.as_type [symbolic]
  567. // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
  568. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  569. // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
  570. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  571. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
  572. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  573. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  574. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  575. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  576. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  577. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  578. // CHECK:STDOUT: %C.3f0: type = class_type @C, @C(%T) [symbolic]
  579. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  580. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  581. // CHECK:STDOUT: %HasF.impl_witness.94c: <witness> = impl_witness file.%HasF.impl_witness_table, @C.as.HasF.impl(%T) [symbolic]
  582. // CHECK:STDOUT: %pattern_type.06f: type = pattern_type %C.3f0 [symbolic]
  583. // CHECK:STDOUT: %C.as.HasF.impl.F.type.ce1: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T) [symbolic]
  584. // CHECK:STDOUT: %C.as.HasF.impl.F.019: %C.as.HasF.impl.F.type.ce1 = struct_value () [symbolic]
  585. // CHECK:STDOUT: %HasF.facet.e4a: %HasF.type = facet_value %C.3f0, (%HasF.impl_witness.94c) [symbolic]
  586. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C.3f0 [symbolic]
  587. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  588. // CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete]
  589. // CHECK:STDOUT: %pattern_type.99a: type = pattern_type %C.7a7 [concrete]
  590. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  591. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  592. // CHECK:STDOUT: %HasF.impl_witness.cb0: <witness> = impl_witness file.%HasF.impl_witness_table, @C.as.HasF.impl(%empty_struct_type) [concrete]
  593. // CHECK:STDOUT: %C.as.HasF.impl.F.type.3eb: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%empty_struct_type) [concrete]
  594. // CHECK:STDOUT: %C.as.HasF.impl.F.6c4: %C.as.HasF.impl.F.type.3eb = struct_value () [concrete]
  595. // CHECK:STDOUT: %HasF.facet.a36: %HasF.type = facet_value %C.7a7, (%HasF.impl_witness.cb0) [concrete]
  596. // CHECK:STDOUT: %.b41: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.a36 [concrete]
  597. // CHECK:STDOUT: %C.as.HasF.impl.F.specific_fn: <specific function> = specific_function %C.as.HasF.impl.F.6c4, @C.as.HasF.impl.F(%empty_struct_type) [concrete]
  598. // CHECK:STDOUT: }
  599. // CHECK:STDOUT:
  600. // CHECK:STDOUT: imports {
  601. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  602. // CHECK:STDOUT: import Core//prelude
  603. // CHECK:STDOUT: import Core//prelude/...
  604. // CHECK:STDOUT: }
  605. // CHECK:STDOUT: }
  606. // CHECK:STDOUT:
  607. // CHECK:STDOUT: file {
  608. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  609. // CHECK:STDOUT: .Core = imports.%Core
  610. // CHECK:STDOUT: .HasF = %HasF.decl
  611. // CHECK:STDOUT: .C = %C.decl
  612. // CHECK:STDOUT: .G = %G.decl
  613. // CHECK:STDOUT: }
  614. // CHECK:STDOUT: %Core.import = import Core
  615. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  616. // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
  617. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  618. // CHECK:STDOUT: } {
  619. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  620. // CHECK:STDOUT: %T.loc8_9.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
  621. // CHECK:STDOUT: }
  622. // CHECK:STDOUT: impl_decl @C.as.HasF.impl [concrete] {
  623. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  624. // CHECK:STDOUT: } {
  625. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  626. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.2 [symbolic = %T.loc10_14.1 (constants.%T)]
  627. // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C.3f0)]
  628. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  629. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  630. // CHECK:STDOUT: %T.loc10_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
  631. // CHECK:STDOUT: }
  632. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@C.as.HasF.impl.%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete]
  633. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = @C.as.HasF.impl.%HasF.impl_witness (constants.%HasF.impl_witness.94c)]
  634. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  635. // CHECK:STDOUT: %x.patt: %pattern_type.99a = value_binding_pattern x [concrete]
  636. // CHECK:STDOUT: %x.param_patt: %pattern_type.99a = value_param_pattern %x.patt, call_param0 [concrete]
  637. // CHECK:STDOUT: } {
  638. // CHECK:STDOUT: %x.param: %C.7a7 = value_param call_param0
  639. // CHECK:STDOUT: %.loc14_13.1: type = splice_block %C [concrete = constants.%C.7a7] {
  640. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  641. // CHECK:STDOUT: %.loc14_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  642. // CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  643. // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.7a7]
  644. // CHECK:STDOUT: }
  645. // CHECK:STDOUT: %x: %C.7a7 = value_binding x, %x.param
  646. // CHECK:STDOUT: }
  647. // CHECK:STDOUT: }
  648. // CHECK:STDOUT:
  649. // CHECK:STDOUT: interface @HasF {
  650. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  651. // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
  652. // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.e68) = value_binding_pattern self [concrete]
  653. // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.e68) = value_param_pattern %self.patt, call_param0 [concrete]
  654. // CHECK:STDOUT: } {
  655. // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  656. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  657. // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
  658. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  659. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  660. // CHECK:STDOUT: }
  661. // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  662. // CHECK:STDOUT: }
  663. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: !members:
  666. // CHECK:STDOUT: .Self = %Self
  667. // CHECK:STDOUT: .F = %assoc0
  668. // CHECK:STDOUT: witness = (%HasF.F.decl)
  669. // CHECK:STDOUT:
  670. // CHECK:STDOUT: !requires:
  671. // CHECK:STDOUT: }
  672. // CHECK:STDOUT:
  673. // CHECK:STDOUT: generic impl @C.as.HasF.impl(%T.loc10_14.2: type) {
  674. // CHECK:STDOUT: %T.loc10_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
  675. // CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_14.1) [symbolic = %C.loc10_27.1 (constants.%C.3f0)]
  676. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_14.1) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.94c)]
  677. // CHECK:STDOUT:
  678. // CHECK:STDOUT: !definition:
  679. // 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.ce1)]
  680. // CHECK:STDOUT: %C.as.HasF.impl.F: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.ce1) = struct_value () [symbolic = %C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.019)]
  681. // CHECK:STDOUT:
  682. // CHECK:STDOUT: impl: %C.loc10_27.2 as %HasF.ref {
  683. // CHECK:STDOUT: %C.as.HasF.impl.F.decl: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.ce1) = fn_decl @C.as.HasF.impl.F [symbolic = @C.as.HasF.impl.%C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.019)] {
  684. // CHECK:STDOUT: %self.patt: @C.as.HasF.impl.F.%pattern_type (%pattern_type.06f) = value_binding_pattern self [concrete]
  685. // CHECK:STDOUT: %self.param_patt: @C.as.HasF.impl.F.%pattern_type (%pattern_type.06f) = value_param_pattern %self.patt, call_param0 [concrete]
  686. // CHECK:STDOUT: } {
  687. // CHECK:STDOUT: %self.param: @C.as.HasF.impl.F.%C (%C.3f0) = value_param call_param0
  688. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_27.2 [symbolic = %C (constants.%C.3f0)]
  689. // CHECK:STDOUT: %self: @C.as.HasF.impl.F.%C (%C.3f0) = value_binding self, %self.param
  690. // CHECK:STDOUT: }
  691. // CHECK:STDOUT:
  692. // CHECK:STDOUT: !members:
  693. // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
  694. // CHECK:STDOUT: witness = file.%HasF.impl_witness
  695. // CHECK:STDOUT: }
  696. // CHECK:STDOUT: }
  697. // CHECK:STDOUT:
  698. // CHECK:STDOUT: generic class @C(%T.loc8_9.2: type) {
  699. // CHECK:STDOUT: %T.loc8_9.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
  700. // CHECK:STDOUT:
  701. // CHECK:STDOUT: !definition:
  702. // CHECK:STDOUT:
  703. // CHECK:STDOUT: class {
  704. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  705. // CHECK:STDOUT: complete_type_witness = %complete_type
  706. // CHECK:STDOUT:
  707. // CHECK:STDOUT: !members:
  708. // CHECK:STDOUT: .Self = constants.%C.3f0
  709. // CHECK:STDOUT: }
  710. // CHECK:STDOUT: }
  711. // CHECK:STDOUT:
  712. // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
  713. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  714. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  715. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.e68)]
  716. // CHECK:STDOUT:
  717. // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
  718. // CHECK:STDOUT: }
  719. // CHECK:STDOUT:
  720. // CHECK:STDOUT: generic fn @C.as.HasF.impl.F(@C.as.HasF.impl.%T.loc10_14.2: type) {
  721. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  722. // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.3f0)]
  723. // CHECK:STDOUT: %pattern_type: type = pattern_type %C [symbolic = %pattern_type (constants.%pattern_type.06f)]
  724. // CHECK:STDOUT:
  725. // CHECK:STDOUT: !definition:
  726. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C [symbolic = %require_complete (constants.%require_complete)]
  727. // CHECK:STDOUT:
  728. // CHECK:STDOUT: fn(%self.param: @C.as.HasF.impl.F.%C (%C.3f0)) {
  729. // CHECK:STDOUT: !entry:
  730. // CHECK:STDOUT: return
  731. // CHECK:STDOUT: }
  732. // CHECK:STDOUT: }
  733. // CHECK:STDOUT:
  734. // CHECK:STDOUT: fn @G(%x.param: %C.7a7) {
  735. // CHECK:STDOUT: !entry:
  736. // CHECK:STDOUT: %x.ref: %C.7a7 = name_ref x, %x
  737. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  738. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0]
  739. // CHECK:STDOUT: %impl.elem0: %.b41 = impl_witness_access constants.%HasF.impl_witness.cb0, element0 [concrete = constants.%C.as.HasF.impl.F.6c4]
  740. // CHECK:STDOUT: %bound_method.loc15_4: <bound method> = bound_method %x.ref, %impl.elem0
  741. // 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]
  742. // CHECK:STDOUT: %bound_method.loc15_14: <bound method> = bound_method %x.ref, %specific_fn
  743. // CHECK:STDOUT: %C.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc15_14(%x.ref)
  744. // CHECK:STDOUT: return
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT:
  747. // CHECK:STDOUT: specific @HasF.F(constants.%Self) {
  748. // CHECK:STDOUT: %Self => constants.%Self
  749. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  750. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e68
  751. // CHECK:STDOUT: }
  752. // CHECK:STDOUT:
  753. // CHECK:STDOUT: specific @C(constants.%T) {
  754. // CHECK:STDOUT: %T.loc8_9.1 => constants.%T
  755. // CHECK:STDOUT:
  756. // CHECK:STDOUT: !definition:
  757. // CHECK:STDOUT: }
  758. // CHECK:STDOUT:
  759. // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%T) {
  760. // CHECK:STDOUT: %T.loc10_14.1 => constants.%T
  761. // CHECK:STDOUT: %C.loc10_27.1 => constants.%C.3f0
  762. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.94c
  763. // CHECK:STDOUT:
  764. // CHECK:STDOUT: !definition:
  765. // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.ce1
  766. // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.019
  767. // CHECK:STDOUT: }
  768. // CHECK:STDOUT:
  769. // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%T) {
  770. // CHECK:STDOUT: %T => constants.%T
  771. // CHECK:STDOUT: %C => constants.%C.3f0
  772. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.06f
  773. // CHECK:STDOUT: }
  774. // CHECK:STDOUT:
  775. // CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.e4a) {
  776. // CHECK:STDOUT: %Self => constants.%HasF.facet.e4a
  777. // CHECK:STDOUT: %Self.binding.as_type => constants.%C.3f0
  778. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.06f
  779. // CHECK:STDOUT: }
  780. // CHECK:STDOUT:
  781. // CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
  782. // CHECK:STDOUT: %T.loc8_9.1 => constants.%empty_struct_type
  783. // CHECK:STDOUT:
  784. // CHECK:STDOUT: !definition:
  785. // CHECK:STDOUT: }
  786. // CHECK:STDOUT:
  787. // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%empty_struct_type) {
  788. // CHECK:STDOUT: %T.loc10_14.1 => constants.%empty_struct_type
  789. // CHECK:STDOUT: %C.loc10_27.1 => constants.%C.7a7
  790. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.cb0
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: !definition:
  793. // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.3eb
  794. // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.6c4
  795. // CHECK:STDOUT: }
  796. // CHECK:STDOUT:
  797. // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%empty_struct_type) {
  798. // CHECK:STDOUT: %T => constants.%empty_struct_type
  799. // CHECK:STDOUT: %C => constants.%C.7a7
  800. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.99a
  801. // CHECK:STDOUT:
  802. // CHECK:STDOUT: !definition:
  803. // CHECK:STDOUT: %require_complete => constants.%complete_type
  804. // CHECK:STDOUT: }
  805. // CHECK:STDOUT:
  806. // CHECK:STDOUT: --- deduced_interface_argument.carbon
  807. // CHECK:STDOUT:
  808. // CHECK:STDOUT: constants {
  809. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  810. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  811. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  812. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  813. // CHECK:STDOUT: %HasF.type.fe3: type = generic_interface_type @HasF [concrete]
  814. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  815. // CHECK:STDOUT: %HasF.generic: %HasF.type.fe3 = struct_value () [concrete]
  816. // CHECK:STDOUT: %HasF.type.59b: type = facet_type <@HasF, @HasF(%T)> [symbolic]
  817. // CHECK:STDOUT: %Self.69f: %HasF.type.59b = symbolic_binding Self, 1 [symbolic]
  818. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.69f [symbolic]
  819. // CHECK:STDOUT: %pattern_type.429: type = pattern_type %Self.binding.as_type [symbolic]
  820. // CHECK:STDOUT: %HasF.F.type.940: type = fn_type @HasF.F, @HasF(%T) [symbolic]
  821. // CHECK:STDOUT: %HasF.F.86b: %HasF.F.type.940 = struct_value () [symbolic]
  822. // CHECK:STDOUT: %HasF.assoc_type.1aa: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
  823. // CHECK:STDOUT: %assoc0.bd3: %HasF.assoc_type.1aa = assoc_entity element0, @HasF.%HasF.F.decl [symbolic]
  824. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  825. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  826. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.59b [symbolic]
  827. // CHECK:STDOUT: %HasF.impl_witness.350: <witness> = impl_witness file.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T) [symbolic]
  828. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  829. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.83a: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T) [symbolic]
  830. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.1e9: %empty_struct_type.as.HasF.impl.F.type.83a = struct_value () [symbolic]
  831. // CHECK:STDOUT: %HasF.facet.67e: %HasF.type.59b = facet_value %empty_struct_type, (%HasF.impl_witness.350) [symbolic]
  832. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  833. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  834. // CHECK:STDOUT: %HasF.type.48b: type = facet_type <@HasF, @HasF(%empty_struct_type)> [concrete]
  835. // CHECK:STDOUT: %Self.82e: %HasF.type.48b = symbolic_binding Self, 1 [symbolic]
  836. // CHECK:STDOUT: %HasF.F.type.b0b: type = fn_type @HasF.F, @HasF(%empty_struct_type) [concrete]
  837. // CHECK:STDOUT: %HasF.F.418: %HasF.F.type.b0b = struct_value () [concrete]
  838. // CHECK:STDOUT: %HasF.assoc_type.9e4: type = assoc_entity_type @HasF, @HasF(%empty_struct_type) [concrete]
  839. // CHECK:STDOUT: %assoc0.95d: %HasF.assoc_type.9e4 = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
  840. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %HasF.type.48b [concrete]
  841. // CHECK:STDOUT: %HasF.impl_witness.d67: <witness> = impl_witness file.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete]
  842. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.587: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete]
  843. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.eab: %empty_struct_type.as.HasF.impl.F.type.587 = struct_value () [concrete]
  844. // CHECK:STDOUT: %HasF.facet.f01: %HasF.type.48b = facet_value %empty_struct_type, (%HasF.impl_witness.d67) [concrete]
  845. // CHECK:STDOUT: %.24f: type = fn_type_with_self_type %HasF.F.type.b0b, %HasF.facet.f01 [concrete]
  846. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.specific_fn: <specific function> = specific_function %empty_struct_type.as.HasF.impl.F.eab, @empty_struct_type.as.HasF.impl.F(%empty_struct_type) [concrete]
  847. // CHECK:STDOUT: }
  848. // CHECK:STDOUT:
  849. // CHECK:STDOUT: imports {
  850. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  851. // CHECK:STDOUT: import Core//prelude
  852. // CHECK:STDOUT: import Core//prelude/...
  853. // CHECK:STDOUT: }
  854. // CHECK:STDOUT: }
  855. // CHECK:STDOUT:
  856. // CHECK:STDOUT: file {
  857. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  858. // CHECK:STDOUT: .Core = imports.%Core
  859. // CHECK:STDOUT: .HasF = %HasF.decl
  860. // CHECK:STDOUT: .G = %G.decl
  861. // CHECK:STDOUT: }
  862. // CHECK:STDOUT: %Core.import = import Core
  863. // CHECK:STDOUT: %HasF.decl: %HasF.type.fe3 = interface_decl @HasF [concrete = constants.%HasF.generic] {
  864. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  865. // CHECK:STDOUT: } {
  866. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  867. // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT: impl_decl @empty_struct_type.as.HasF.impl [concrete] {
  870. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  871. // CHECK:STDOUT: } {
  872. // CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  873. // CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  874. // CHECK:STDOUT: %HasF.ref: %HasF.type.fe3 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  875. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  876. // CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.59b)]
  877. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  878. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  879. // CHECK:STDOUT: }
  880. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.decl), @empty_struct_type.as.HasF.impl [concrete]
  881. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = @empty_struct_type.as.HasF.impl.%HasF.impl_witness (constants.%HasF.impl_witness.350)]
  882. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  883. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
  884. // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern %x.patt, call_param0 [concrete]
  885. // CHECK:STDOUT: } {
  886. // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
  887. // CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = constants.%empty_struct_type] {
  888. // CHECK:STDOUT: %.loc12_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  889. // CHECK:STDOUT: %.loc12_10.3: type = converted %.loc12_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  890. // CHECK:STDOUT: }
  891. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
  892. // CHECK:STDOUT: }
  893. // CHECK:STDOUT: }
  894. // CHECK:STDOUT:
  895. // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.2: type) {
  896. // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  897. // CHECK:STDOUT:
  898. // CHECK:STDOUT: !definition:
  899. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.59b)]
  900. // CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.59b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.69f)]
  901. // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.940)]
  902. // CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.940) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.86b)]
  903. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.1aa)]
  904. // CHECK:STDOUT: %assoc0.loc5_21.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.1aa) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.bd3)]
  905. // CHECK:STDOUT:
  906. // CHECK:STDOUT: interface {
  907. // CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.59b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.69f)]
  908. // CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.940) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.86b)] {
  909. // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.429) = value_binding_pattern self [concrete]
  910. // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.429) = value_param_pattern %self.patt, call_param0 [concrete]
  911. // CHECK:STDOUT: } {
  912. // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  913. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  914. // CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.59b) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.69f)]
  915. // CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.59b) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.69f)]
  916. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  917. // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  918. // CHECK:STDOUT: }
  919. // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  920. // CHECK:STDOUT: }
  921. // CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.1aa) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.bd3)]
  922. // CHECK:STDOUT:
  923. // CHECK:STDOUT: !members:
  924. // CHECK:STDOUT: .Self = %Self.loc4_26.1
  925. // CHECK:STDOUT: .F = %assoc0.loc5_21.1
  926. // CHECK:STDOUT: witness = (%HasF.F.decl)
  927. // CHECK:STDOUT:
  928. // CHECK:STDOUT: !requires:
  929. // CHECK:STDOUT: }
  930. // CHECK:STDOUT: }
  931. // CHECK:STDOUT:
  932. // CHECK:STDOUT: generic impl @empty_struct_type.as.HasF.impl(%T.loc8_14.2: type) {
  933. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  934. // 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.59b)]
  935. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_36.1 [symbolic = %require_complete (constants.%require_complete)]
  936. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness.350)]
  937. // CHECK:STDOUT:
  938. // CHECK:STDOUT: !definition:
  939. // 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.83a)]
  940. // 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.83a) = struct_value () [symbolic = %empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.1e9)]
  941. // CHECK:STDOUT:
  942. // CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.2 {
  943. // 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.83a) = 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.1e9)] {
  944. // CHECK:STDOUT: %self.patt: %pattern_type.a96 = value_binding_pattern self [concrete]
  945. // CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = value_param_pattern %self.patt, call_param0 [concrete]
  946. // CHECK:STDOUT: } {
  947. // CHECK:STDOUT: %self.param: %empty_struct_type = value_param call_param0
  948. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_25.2 [concrete = constants.%empty_struct_type]
  949. // CHECK:STDOUT: %self: %empty_struct_type = value_binding self, %self.param
  950. // CHECK:STDOUT: }
  951. // CHECK:STDOUT:
  952. // CHECK:STDOUT: !members:
  953. // CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl
  954. // CHECK:STDOUT: witness = file.%HasF.impl_witness
  955. // CHECK:STDOUT: }
  956. // CHECK:STDOUT: }
  957. // CHECK:STDOUT:
  958. // CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.59b)) {
  959. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  960. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.59b)]
  961. // CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.59b) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.69f)]
  962. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  963. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.429)]
  964. // CHECK:STDOUT:
  965. // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
  966. // CHECK:STDOUT: }
  967. // CHECK:STDOUT:
  968. // CHECK:STDOUT: generic fn @empty_struct_type.as.HasF.impl.F(@empty_struct_type.as.HasF.impl.%T.loc8_14.2: type) {
  969. // CHECK:STDOUT: !definition:
  970. // CHECK:STDOUT:
  971. // CHECK:STDOUT: fn(%self.param: %empty_struct_type) {
  972. // CHECK:STDOUT: !entry:
  973. // CHECK:STDOUT: return
  974. // CHECK:STDOUT: }
  975. // CHECK:STDOUT: }
  976. // CHECK:STDOUT:
  977. // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
  978. // CHECK:STDOUT: !entry:
  979. // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
  980. // CHECK:STDOUT: %HasF.ref: %HasF.type.fe3 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  981. // CHECK:STDOUT: %.loc13_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  982. // CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  983. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%empty_struct_type)> [concrete = constants.%HasF.type.48b]
  984. // CHECK:STDOUT: %.loc13_14: %HasF.assoc_type.9e4 = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%empty_struct_type) [concrete = constants.%assoc0.95d]
  985. // CHECK:STDOUT: %F.ref: %HasF.assoc_type.9e4 = name_ref F, %.loc13_14 [concrete = constants.%assoc0.95d]
  986. // CHECK:STDOUT: %impl.elem0: %.24f = impl_witness_access constants.%HasF.impl_witness.d67, element0 [concrete = constants.%empty_struct_type.as.HasF.impl.F.eab]
  987. // CHECK:STDOUT: %bound_method.loc13_4: <bound method> = bound_method %x.ref, %impl.elem0
  988. // 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]
  989. // CHECK:STDOUT: %bound_method.loc13_18: <bound method> = bound_method %x.ref, %specific_fn
  990. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc13_18(%x.ref)
  991. // CHECK:STDOUT: return
  992. // CHECK:STDOUT: }
  993. // CHECK:STDOUT:
  994. // CHECK:STDOUT: specific @HasF(constants.%T) {
  995. // CHECK:STDOUT: %T.loc4_16.1 => constants.%T
  996. // CHECK:STDOUT:
  997. // CHECK:STDOUT: !definition:
  998. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.59b
  999. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.69f
  1000. // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.940
  1001. // CHECK:STDOUT: %HasF.F => constants.%HasF.F.86b
  1002. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.1aa
  1003. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.bd3
  1004. // CHECK:STDOUT: }
  1005. // CHECK:STDOUT:
  1006. // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%Self.69f) {
  1007. // CHECK:STDOUT: %T => constants.%T
  1008. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.59b
  1009. // CHECK:STDOUT: %Self => constants.%Self.69f
  1010. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1011. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.429
  1012. // CHECK:STDOUT: }
  1013. // CHECK:STDOUT:
  1014. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%T) {
  1015. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  1016. // CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.59b
  1017. // CHECK:STDOUT: %require_complete => constants.%require_complete
  1018. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.350
  1019. // CHECK:STDOUT:
  1020. // CHECK:STDOUT: !definition:
  1021. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type => constants.%empty_struct_type.as.HasF.impl.F.type.83a
  1022. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.1e9
  1023. // CHECK:STDOUT: }
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%T) {}
  1026. // CHECK:STDOUT:
  1027. // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%HasF.facet.67e) {
  1028. // CHECK:STDOUT: %T => constants.%T
  1029. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.59b
  1030. // CHECK:STDOUT: %Self => constants.%HasF.facet.67e
  1031. // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type
  1032. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96
  1033. // CHECK:STDOUT: }
  1034. // CHECK:STDOUT:
  1035. // CHECK:STDOUT: specific @HasF(constants.%empty_struct_type) {
  1036. // CHECK:STDOUT: %T.loc4_16.1 => constants.%empty_struct_type
  1037. // CHECK:STDOUT:
  1038. // CHECK:STDOUT: !definition:
  1039. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.48b
  1040. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.82e
  1041. // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.b0b
  1042. // CHECK:STDOUT: %HasF.F => constants.%HasF.F.418
  1043. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.9e4
  1044. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.95d
  1045. // CHECK:STDOUT: }
  1046. // CHECK:STDOUT:
  1047. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%empty_struct_type) {
  1048. // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
  1049. // CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.48b
  1050. // CHECK:STDOUT: %require_complete => constants.%complete_type
  1051. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness.d67
  1052. // CHECK:STDOUT:
  1053. // CHECK:STDOUT: !definition:
  1054. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type => constants.%empty_struct_type.as.HasF.impl.F.type.587
  1055. // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.eab
  1056. // CHECK:STDOUT: }
  1057. // CHECK:STDOUT:
  1058. // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) {
  1059. // CHECK:STDOUT: !definition:
  1060. // CHECK:STDOUT: }
  1061. // CHECK:STDOUT:
  1062. // CHECK:STDOUT: --- fail_incomplete_deduction.carbon
  1063. // CHECK:STDOUT:
  1064. // CHECK:STDOUT: constants {
  1065. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
  1066. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
  1067. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
  1068. // CHECK:STDOUT: %pattern_type.e682: type = pattern_type %Self.binding.as_type [symbolic]
  1069. // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
  1070. // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
  1071. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
  1072. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
  1073. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1074. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1075. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1076. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  1077. // CHECK:STDOUT: %U: type = symbolic_binding U, 1 [symbolic]
  1078. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T, %U) [symbolic]
  1079. // CHECK:STDOUT: %pattern_type.e683: type = pattern_type %T [symbolic]
  1080. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T, %U) [symbolic]
  1081. // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic]
  1082. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
  1083. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1084. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  1085. // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
  1086. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  1087. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  1088. // CHECK:STDOUT: }
  1089. // CHECK:STDOUT:
  1090. // CHECK:STDOUT: imports {
  1091. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1092. // CHECK:STDOUT: import Core//prelude
  1093. // CHECK:STDOUT: import Core//prelude/...
  1094. // CHECK:STDOUT: }
  1095. // CHECK:STDOUT: }
  1096. // CHECK:STDOUT:
  1097. // CHECK:STDOUT: file {
  1098. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1099. // CHECK:STDOUT: .Core = imports.%Core
  1100. // CHECK:STDOUT: .HasF = %HasF.decl
  1101. // CHECK:STDOUT: .G = %G.decl
  1102. // CHECK:STDOUT: }
  1103. // CHECK:STDOUT: %Core.import = import Core
  1104. // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
  1105. // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
  1106. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  1107. // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete]
  1108. // CHECK:STDOUT: } {
  1109. // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.2 [symbolic = %T.loc12_14.1 (constants.%T)]
  1110. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  1111. // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1112. // CHECK:STDOUT: %T.loc12_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.1 (constants.%T)]
  1113. // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1114. // CHECK:STDOUT: %U.loc12_24.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
  1115. // CHECK:STDOUT: }
  1116. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (<error>), @T.as.HasF.impl [concrete]
  1117. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = @T.as.HasF.impl.%HasF.impl_witness (constants.%HasF.impl_witness)]
  1118. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  1119. // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
  1120. // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern %x.patt, call_param0 [concrete]
  1121. // CHECK:STDOUT: } {
  1122. // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
  1123. // CHECK:STDOUT: %.loc16_10.1: type = splice_block %.loc16_10.3 [concrete = constants.%empty_struct_type] {
  1124. // CHECK:STDOUT: %.loc16_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  1125. // CHECK:STDOUT: %.loc16_10.3: type = converted %.loc16_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
  1126. // CHECK:STDOUT: }
  1127. // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
  1128. // CHECK:STDOUT: }
  1129. // CHECK:STDOUT: }
  1130. // CHECK:STDOUT:
  1131. // CHECK:STDOUT: interface @HasF {
  1132. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  1133. // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
  1134. // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.e682) = value_binding_pattern self [concrete]
  1135. // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.e682) = value_param_pattern %self.patt, call_param0 [concrete]
  1136. // CHECK:STDOUT: } {
  1137. // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1138. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1139. // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
  1140. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1141. // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1142. // CHECK:STDOUT: }
  1143. // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1144. // CHECK:STDOUT: }
  1145. // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
  1146. // CHECK:STDOUT:
  1147. // CHECK:STDOUT: !members:
  1148. // CHECK:STDOUT: .Self = %Self
  1149. // CHECK:STDOUT: .F = %assoc0
  1150. // CHECK:STDOUT: witness = (%HasF.F.decl)
  1151. // CHECK:STDOUT:
  1152. // CHECK:STDOUT: !requires:
  1153. // CHECK:STDOUT: }
  1154. // CHECK:STDOUT:
  1155. // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_14.2: type, %U.loc12_24.2: type) {
  1156. // CHECK:STDOUT: %T.loc12_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.1 (constants.%T)]
  1157. // CHECK:STDOUT: %U.loc12_24.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
  1158. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_14.1, %U.loc12_24.1) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness)]
  1159. // CHECK:STDOUT:
  1160. // CHECK:STDOUT: !definition:
  1161. // 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)]
  1162. // 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)]
  1163. // CHECK:STDOUT:
  1164. // CHECK:STDOUT: impl: %T.ref as %HasF.ref {
  1165. // 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)] {
  1166. // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.e683) = value_binding_pattern self [concrete]
  1167. // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.e683) = value_param_pattern %self.patt, call_param0 [concrete]
  1168. // CHECK:STDOUT: } {
  1169. // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
  1170. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
  1171. // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
  1172. // CHECK:STDOUT: }
  1173. // CHECK:STDOUT:
  1174. // CHECK:STDOUT: !members:
  1175. // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
  1176. // CHECK:STDOUT: witness = <error>
  1177. // CHECK:STDOUT: }
  1178. // CHECK:STDOUT: }
  1179. // CHECK:STDOUT:
  1180. // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
  1181. // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
  1182. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1183. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.e682)]
  1184. // CHECK:STDOUT:
  1185. // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
  1186. // CHECK:STDOUT: }
  1187. // CHECK:STDOUT:
  1188. // 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) {
  1189. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1190. // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.e683)]
  1191. // CHECK:STDOUT:
  1192. // CHECK:STDOUT: !definition:
  1193. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
  1194. // CHECK:STDOUT:
  1195. // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
  1196. // CHECK:STDOUT: !entry:
  1197. // CHECK:STDOUT: return
  1198. // CHECK:STDOUT: }
  1199. // CHECK:STDOUT: }
  1200. // CHECK:STDOUT:
  1201. // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
  1202. // CHECK:STDOUT: !entry:
  1203. // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
  1204. // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
  1205. // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0]
  1206. // CHECK:STDOUT: return
  1207. // CHECK:STDOUT: }
  1208. // CHECK:STDOUT:
  1209. // CHECK:STDOUT: specific @HasF.F(constants.%Self) {
  1210. // CHECK:STDOUT: %Self => constants.%Self
  1211. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1212. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e682
  1213. // CHECK:STDOUT: }
  1214. // CHECK:STDOUT:
  1215. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T, constants.%U) {
  1216. // CHECK:STDOUT: %T.loc12_14.1 => constants.%T
  1217. // CHECK:STDOUT: %U.loc12_24.1 => constants.%U
  1218. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness
  1219. // CHECK:STDOUT:
  1220. // CHECK:STDOUT: !definition:
  1221. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
  1222. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F
  1223. // CHECK:STDOUT: }
  1224. // CHECK:STDOUT:
  1225. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T, constants.%U) {
  1226. // CHECK:STDOUT: %T => constants.%T
  1227. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e683
  1228. // CHECK:STDOUT: }
  1229. // CHECK:STDOUT:
  1230. // CHECK:STDOUT: --- fail_inconsistent_deduction.carbon
  1231. // CHECK:STDOUT:
  1232. // CHECK:STDOUT: constants {
  1233. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  1234. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
  1235. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  1236. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  1237. // CHECK:STDOUT: %HasF.type.fe3: type = generic_interface_type @HasF [concrete]
  1238. // CHECK:STDOUT: %HasF.generic: %HasF.type.fe3 = struct_value () [concrete]
  1239. // CHECK:STDOUT: %HasF.type.59b: type = facet_type <@HasF, @HasF(%T)> [symbolic]
  1240. // CHECK:STDOUT: %Self.69f: %HasF.type.59b = symbolic_binding Self, 1 [symbolic]
  1241. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.69f [symbolic]
  1242. // CHECK:STDOUT: %pattern_type.429: type = pattern_type %Self.binding.as_type [symbolic]
  1243. // CHECK:STDOUT: %HasF.F.type.940: type = fn_type @HasF.F, @HasF(%T) [symbolic]
  1244. // CHECK:STDOUT: %HasF.F.86b: %HasF.F.type.940 = struct_value () [symbolic]
  1245. // CHECK:STDOUT: %HasF.assoc_type.1aa: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
  1246. // CHECK:STDOUT: %assoc0.bd3: %HasF.assoc_type.1aa = assoc_entity element0, @HasF.%HasF.F.decl [symbolic]
  1247. // CHECK:STDOUT: %require_complete.b92: <witness> = require_complete_type %HasF.type.59b [symbolic]
  1248. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
  1249. // CHECK:STDOUT: %pattern_type.e68: type = pattern_type %T [symbolic]
  1250. // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
  1251. // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic]
  1252. // CHECK:STDOUT: %HasF.facet: %HasF.type.59b = facet_value %T, (%HasF.impl_witness) [symbolic]
  1253. // CHECK:STDOUT: %require_complete.4b7: <witness> = require_complete_type %T [symbolic]
  1254. // CHECK:STDOUT: %A: type = class_type @A [concrete]
  1255. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  1256. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  1257. // CHECK:STDOUT: %B: type = class_type @B [concrete]
  1258. // CHECK:STDOUT: %pattern_type.c10: type = pattern_type %A [concrete]
  1259. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  1260. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  1261. // CHECK:STDOUT: %HasF.type.296: type = facet_type <@HasF, @HasF(%B)> [concrete]
  1262. // CHECK:STDOUT: %Self.3f1: %HasF.type.296 = symbolic_binding Self, 1 [symbolic]
  1263. // CHECK:STDOUT: %HasF.F.type.1c6: type = fn_type @HasF.F, @HasF(%B) [concrete]
  1264. // CHECK:STDOUT: %HasF.F.7cf: %HasF.F.type.1c6 = struct_value () [concrete]
  1265. // CHECK:STDOUT: %HasF.assoc_type.1af: type = assoc_entity_type @HasF, @HasF(%B) [concrete]
  1266. // CHECK:STDOUT: %assoc0.4fe: %HasF.assoc_type.1af = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
  1267. // CHECK:STDOUT: }
  1268. // CHECK:STDOUT:
  1269. // CHECK:STDOUT: imports {
  1270. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1271. // CHECK:STDOUT: import Core//prelude
  1272. // CHECK:STDOUT: import Core//prelude/...
  1273. // CHECK:STDOUT: }
  1274. // CHECK:STDOUT: }
  1275. // CHECK:STDOUT:
  1276. // CHECK:STDOUT: file {
  1277. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  1278. // CHECK:STDOUT: .Core = imports.%Core
  1279. // CHECK:STDOUT: .HasF = %HasF.decl
  1280. // CHECK:STDOUT: .A = %A.decl
  1281. // CHECK:STDOUT: .B = %B.decl
  1282. // CHECK:STDOUT: .G = %G.decl
  1283. // CHECK:STDOUT: }
  1284. // CHECK:STDOUT: %Core.import = import Core
  1285. // CHECK:STDOUT: %HasF.decl: %HasF.type.fe3 = interface_decl @HasF [concrete = constants.%HasF.generic] {
  1286. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  1287. // CHECK:STDOUT: } {
  1288. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1289. // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  1290. // CHECK:STDOUT: }
  1291. // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
  1292. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  1293. // CHECK:STDOUT: } {
  1294. // CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  1295. // CHECK:STDOUT: %HasF.ref: %HasF.type.fe3 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  1296. // CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
  1297. // CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.59b)]
  1298. // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
  1299. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  1300. // CHECK:STDOUT: }
  1301. // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (@T.as.HasF.impl.%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
  1302. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = @T.as.HasF.impl.%HasF.impl_witness (constants.%HasF.impl_witness)]
  1303. // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
  1304. // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {}
  1305. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  1306. // CHECK:STDOUT: %x.patt: %pattern_type.c10 = value_binding_pattern x [concrete]
  1307. // CHECK:STDOUT: %x.param_patt: %pattern_type.c10 = value_param_pattern %x.patt, call_param0 [concrete]
  1308. // CHECK:STDOUT: } {
  1309. // CHECK:STDOUT: %x.param: %A = value_param call_param0
  1310. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
  1311. // CHECK:STDOUT: %x: %A = value_binding x, %x.param
  1312. // CHECK:STDOUT: }
  1313. // CHECK:STDOUT: }
  1314. // CHECK:STDOUT:
  1315. // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.2: type) {
  1316. // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
  1317. // CHECK:STDOUT:
  1318. // CHECK:STDOUT: !definition:
  1319. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.59b)]
  1320. // CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.59b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.69f)]
  1321. // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.940)]
  1322. // CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.940) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.86b)]
  1323. // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.1aa)]
  1324. // CHECK:STDOUT: %assoc0.loc5_21.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.1aa) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.bd3)]
  1325. // CHECK:STDOUT:
  1326. // CHECK:STDOUT: interface {
  1327. // CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.59b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.69f)]
  1328. // CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.940) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.86b)] {
  1329. // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.429) = value_binding_pattern self [concrete]
  1330. // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.429) = value_param_pattern %self.patt, call_param0 [concrete]
  1331. // CHECK:STDOUT: } {
  1332. // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
  1333. // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
  1334. // CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.59b) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.69f)]
  1335. // CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.59b) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.69f)]
  1336. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1337. // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1338. // CHECK:STDOUT: }
  1339. // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
  1340. // CHECK:STDOUT: }
  1341. // CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.1aa) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.bd3)]
  1342. // CHECK:STDOUT:
  1343. // CHECK:STDOUT: !members:
  1344. // CHECK:STDOUT: .Self = %Self.loc4_26.1
  1345. // CHECK:STDOUT: .F = %assoc0.loc5_21.1
  1346. // CHECK:STDOUT: witness = (%HasF.F.decl)
  1347. // CHECK:STDOUT:
  1348. // CHECK:STDOUT: !requires:
  1349. // CHECK:STDOUT: }
  1350. // CHECK:STDOUT: }
  1351. // CHECK:STDOUT:
  1352. // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_14.2: type) {
  1353. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  1354. // 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.59b)]
  1355. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete.b92)]
  1356. // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness file.%HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness (constants.%HasF.impl_witness)]
  1357. // CHECK:STDOUT:
  1358. // CHECK:STDOUT: !definition:
  1359. // 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)]
  1360. // 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)]
  1361. // CHECK:STDOUT:
  1362. // CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.2 {
  1363. // 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)] {
  1364. // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.e68) = value_binding_pattern self [concrete]
  1365. // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.e68) = value_param_pattern %self.patt, call_param0 [concrete]
  1366. // CHECK:STDOUT: } {
  1367. // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
  1368. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_24 [symbolic = %T (constants.%T)]
  1369. // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
  1370. // CHECK:STDOUT: }
  1371. // CHECK:STDOUT:
  1372. // CHECK:STDOUT: !members:
  1373. // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
  1374. // CHECK:STDOUT: witness = file.%HasF.impl_witness
  1375. // CHECK:STDOUT: }
  1376. // CHECK:STDOUT: }
  1377. // CHECK:STDOUT:
  1378. // CHECK:STDOUT: class @A {
  1379. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1380. // CHECK:STDOUT: complete_type_witness = %complete_type
  1381. // CHECK:STDOUT:
  1382. // CHECK:STDOUT: !members:
  1383. // CHECK:STDOUT: .Self = constants.%A
  1384. // CHECK:STDOUT: }
  1385. // CHECK:STDOUT:
  1386. // CHECK:STDOUT: class @B {
  1387. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  1388. // CHECK:STDOUT: complete_type_witness = %complete_type
  1389. // CHECK:STDOUT:
  1390. // CHECK:STDOUT: !members:
  1391. // CHECK:STDOUT: .Self = constants.%B
  1392. // CHECK:STDOUT: }
  1393. // CHECK:STDOUT:
  1394. // CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.59b)) {
  1395. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1396. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.59b)]
  1397. // CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.59b) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.69f)]
  1398. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  1399. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.429)]
  1400. // CHECK:STDOUT:
  1401. // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
  1402. // CHECK:STDOUT: }
  1403. // CHECK:STDOUT:
  1404. // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
  1405. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
  1406. // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.e68)]
  1407. // CHECK:STDOUT:
  1408. // CHECK:STDOUT: !definition:
  1409. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.4b7)]
  1410. // CHECK:STDOUT:
  1411. // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
  1412. // CHECK:STDOUT: !entry:
  1413. // CHECK:STDOUT: return
  1414. // CHECK:STDOUT: }
  1415. // CHECK:STDOUT: }
  1416. // CHECK:STDOUT:
  1417. // CHECK:STDOUT: fn @G(%x.param: %A) {
  1418. // CHECK:STDOUT: !entry:
  1419. // CHECK:STDOUT: %x.ref: %A = name_ref x, %x
  1420. // CHECK:STDOUT: %HasF.ref: %HasF.type.fe3 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
  1421. // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
  1422. // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%B)> [concrete = constants.%HasF.type.296]
  1423. // CHECK:STDOUT: %.loc22: %HasF.assoc_type.1af = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%B) [concrete = constants.%assoc0.4fe]
  1424. // CHECK:STDOUT: %F.ref: %HasF.assoc_type.1af = name_ref F, %.loc22 [concrete = constants.%assoc0.4fe]
  1425. // CHECK:STDOUT: return
  1426. // CHECK:STDOUT: }
  1427. // CHECK:STDOUT:
  1428. // CHECK:STDOUT: specific @HasF(constants.%T) {
  1429. // CHECK:STDOUT: %T.loc4_16.1 => constants.%T
  1430. // CHECK:STDOUT:
  1431. // CHECK:STDOUT: !definition:
  1432. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.59b
  1433. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.69f
  1434. // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.940
  1435. // CHECK:STDOUT: %HasF.F => constants.%HasF.F.86b
  1436. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.1aa
  1437. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.bd3
  1438. // CHECK:STDOUT: }
  1439. // CHECK:STDOUT:
  1440. // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%Self.69f) {
  1441. // CHECK:STDOUT: %T => constants.%T
  1442. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.59b
  1443. // CHECK:STDOUT: %Self => constants.%Self.69f
  1444. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  1445. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.429
  1446. // CHECK:STDOUT: }
  1447. // CHECK:STDOUT:
  1448. // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
  1449. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  1450. // CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.59b
  1451. // CHECK:STDOUT: %require_complete => constants.%require_complete.b92
  1452. // CHECK:STDOUT: %HasF.impl_witness => constants.%HasF.impl_witness
  1453. // CHECK:STDOUT:
  1454. // CHECK:STDOUT: !definition:
  1455. // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
  1456. // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F
  1457. // CHECK:STDOUT: }
  1458. // CHECK:STDOUT:
  1459. // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T) {
  1460. // CHECK:STDOUT: %T => constants.%T
  1461. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e68
  1462. // CHECK:STDOUT: }
  1463. // CHECK:STDOUT:
  1464. // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%HasF.facet) {
  1465. // CHECK:STDOUT: %T => constants.%T
  1466. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.59b
  1467. // CHECK:STDOUT: %Self => constants.%HasF.facet
  1468. // CHECK:STDOUT: %Self.binding.as_type => constants.%T
  1469. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e68
  1470. // CHECK:STDOUT: }
  1471. // CHECK:STDOUT:
  1472. // CHECK:STDOUT: specific @HasF(constants.%B) {
  1473. // CHECK:STDOUT: %T.loc4_16.1 => constants.%B
  1474. // CHECK:STDOUT:
  1475. // CHECK:STDOUT: !definition:
  1476. // CHECK:STDOUT: %HasF.type => constants.%HasF.type.296
  1477. // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.3f1
  1478. // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.1c6
  1479. // CHECK:STDOUT: %HasF.F => constants.%HasF.F.7cf
  1480. // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.1af
  1481. // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.4fe
  1482. // CHECK:STDOUT: }
  1483. // CHECK:STDOUT: