fail_assoc_const_alias.carbon 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  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. // AUTOUPDATE
  6. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon
  10. // --- core.carbon
  11. package Core;
  12. interface ImplicitAs(Dest:! type) {
  13. fn Convert[self: Self]() -> Dest;
  14. }
  15. // --- fail_alias_to_different_interface.carbon
  16. library "[[@TEST_NAME]]";
  17. import Core;
  18. interface I {
  19. let T:! type;
  20. }
  21. interface J {
  22. alias U = I.T;
  23. // CHECK:STDERR: fail_alias_to_different_interface.carbon:[[@LINE+7]]:13: error: cannot implicitly convert type `Self` that implements `J` into type implementing `I` [ConversionFailureFacetToFacet]
  24. // CHECK:STDERR: fn F() -> U;
  25. // CHECK:STDERR: ^
  26. // CHECK:STDERR: fail_alias_to_different_interface.carbon:[[@LINE+4]]:13: note: type `J` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessNote]
  27. // CHECK:STDERR: fn F() -> U;
  28. // CHECK:STDERR: ^
  29. // CHECK:STDERR:
  30. fn F() -> U;
  31. }
  32. // --- fail_todo_alias_to_different_interface_with_requires.carbon
  33. library "[[@TEST_NAME]]";
  34. import Core;
  35. interface I2 {
  36. let T2:! type;
  37. }
  38. interface J2;
  39. impl forall [V:! J2] V as I2 where .T2 = () {}
  40. interface J2 {
  41. alias U2 = I2.T2;
  42. // CHECK:STDERR: fail_todo_alias_to_different_interface_with_requires.carbon:[[@LINE+7]]:14: error: cannot implicitly convert type `Self` that implements `J2` into type implementing `I2` [ConversionFailureFacetToFacet]
  43. // CHECK:STDERR: fn F2() -> U2;
  44. // CHECK:STDERR: ^~
  45. // CHECK:STDERR: fail_todo_alias_to_different_interface_with_requires.carbon:[[@LINE+4]]:14: note: type `J2` does not implement interface `Core.ImplicitAs(I2)` [MissingImplInMemberAccessNote]
  46. // CHECK:STDERR: fn F2() -> U2;
  47. // CHECK:STDERR: ^~
  48. // CHECK:STDERR:
  49. fn F2() -> U2;
  50. }
  51. // --- fail_call_method_alias.carbon
  52. library "[[@TEST_NAME]]";
  53. import Core;
  54. interface A {
  55. fn F[self: Self]() -> type;
  56. }
  57. interface B {
  58. alias F = A.F;
  59. // TODO: This should be getting a different error here, since it should not
  60. // be binding `A.F` to `Self`.
  61. // CHECK:STDERR: fail_call_method_alias.carbon:[[@LINE+4]]:13: error: cannot access member of interface `A` in type `B` that does not implement that interface [MissingImplInMemberAccess]
  62. // CHECK:STDERR: fn G() -> F();
  63. // CHECK:STDERR: ^
  64. // CHECK:STDERR:
  65. fn G() -> F();
  66. }
  67. // --- fail_todo_call_with_compound_member_access.carbon
  68. library "[[@TEST_NAME]]";
  69. import Core;
  70. interface C {
  71. fn F[self: Self]();
  72. // TODO: Add `default` once supported.
  73. fn G[self: Self]() {
  74. // These should both work.
  75. self.F();
  76. // CHECK:STDERR: fail_todo_call_with_compound_member_access.carbon:[[@LINE+4]]:11: error: cannot access member of interface `C` in type `C` that does not implement that interface [MissingImplInMemberAccess]
  77. // CHECK:STDERR: self.(F)();
  78. // CHECK:STDERR: ^
  79. // CHECK:STDERR:
  80. self.(F)();
  81. }
  82. }
  83. // CHECK:STDOUT: --- core.carbon
  84. // CHECK:STDOUT:
  85. // CHECK:STDOUT: constants {
  86. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  87. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  88. // CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete]
  89. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete]
  90. // CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  91. // CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
  92. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  93. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
  94. // CHECK:STDOUT: %Convert: %Convert.type = struct_value () [symbolic]
  95. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type %ImplicitAs.type.07f [symbolic]
  96. // CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT:
  99. // CHECK:STDOUT: file {
  100. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  101. // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
  102. // CHECK:STDOUT: }
  103. // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
  104. // CHECK:STDOUT: %Dest.patt.loc3_22.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_22.2 (constants.%Dest.patt)]
  105. // CHECK:STDOUT: } {
  106. // CHECK:STDOUT: %Dest.loc3_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)]
  107. // CHECK:STDOUT: }
  108. // CHECK:STDOUT: }
  109. // CHECK:STDOUT:
  110. // CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc3_22.1: type) {
  111. // CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)]
  112. // CHECK:STDOUT: %Dest.patt.loc3_22.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_22.2 (constants.%Dest.patt)]
  113. // CHECK:STDOUT:
  114. // CHECK:STDOUT: !definition:
  115. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  116. // CHECK:STDOUT: %Self.2: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
  117. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest.loc3_22.2) [symbolic = %Convert.type (constants.%Convert.type)]
  118. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type) = struct_value () [symbolic = %Convert (constants.%Convert)]
  119. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)]
  120. // CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)]
  121. // CHECK:STDOUT:
  122. // CHECK:STDOUT: interface {
  123. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
  124. // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type) = fn_decl @Convert [symbolic = @ImplicitAs.%Convert (constants.%Convert)] {
  125. // CHECK:STDOUT: %self.patt: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = binding_pattern self
  126. // CHECK:STDOUT: %self.param_patt: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
  127. // CHECK:STDOUT: %return.patt: @Convert.%Dest (%Dest) = return_slot_pattern
  128. // CHECK:STDOUT: %return.param_patt: @Convert.%Dest (%Dest) = out_param_pattern %return.patt, call_param1
  129. // CHECK:STDOUT: } {
  130. // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.1 [symbolic = %Dest (constants.%Dest)]
  131. // CHECK:STDOUT: %self.param: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = value_param call_param0
  132. // CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] {
  133. // CHECK:STDOUT: %.loc4_20.2: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
  134. // CHECK:STDOUT: %Self.ref: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)]
  135. // CHECK:STDOUT: %Self.as_type.loc4_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)]
  136. // CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type.loc4_20.2 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)]
  137. // CHECK:STDOUT: }
  138. // CHECK:STDOUT: %self: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = bind_name self, %self.param
  139. // CHECK:STDOUT: %return.param: ref @Convert.%Dest (%Dest) = out_param call_param1
  140. // CHECK:STDOUT: %return: ref @Convert.%Dest (%Dest) = return_slot %return.param
  141. // CHECK:STDOUT: }
  142. // CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)]
  143. // CHECK:STDOUT:
  144. // CHECK:STDOUT: !members:
  145. // CHECK:STDOUT: .Self = %Self.1
  146. // CHECK:STDOUT: .Dest = <poisoned>
  147. // CHECK:STDOUT: .Convert = %assoc0.loc4_35.1
  148. // CHECK:STDOUT: witness = (%Convert.decl)
  149. // CHECK:STDOUT: }
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT:
  152. // CHECK:STDOUT: generic fn @Convert(@ImplicitAs.%Dest.loc3_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
  153. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  154. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  155. // CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
  156. // CHECK:STDOUT: %Self.as_type.loc4_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)]
  157. // CHECK:STDOUT:
  158. // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type)]() -> @Convert.%Dest (%Dest);
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT:
  161. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  162. // CHECK:STDOUT: %Dest.loc3_22.2 => constants.%Dest
  163. // CHECK:STDOUT: %Dest.patt.loc3_22.2 => constants.%Dest
  164. // CHECK:STDOUT: }
  165. // CHECK:STDOUT:
  166. // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self) {
  167. // CHECK:STDOUT: %Dest => constants.%Dest
  168. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
  169. // CHECK:STDOUT: %Self => constants.%Self
  170. // CHECK:STDOUT: %Self.as_type.loc4_20.1 => constants.%Self.as_type
  171. // CHECK:STDOUT: }
  172. // CHECK:STDOUT:
  173. // CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
  174. // CHECK:STDOUT:
  175. // CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {}
  176. // CHECK:STDOUT:
  177. // CHECK:STDOUT: --- fail_alias_to_different_interface.carbon
  178. // CHECK:STDOUT:
  179. // CHECK:STDOUT: constants {
  180. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  181. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  182. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
  183. // CHECK:STDOUT: %assoc0.c7e: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
  184. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  185. // CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
  186. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  187. // CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  188. // CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
  189. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  190. // CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
  191. // CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
  192. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
  193. // CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
  194. // CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
  195. // CHECK:STDOUT: %ImplicitAs.type.c42: type = facet_type <@ImplicitAs, @ImplicitAs(%I.type)> [concrete]
  196. // CHECK:STDOUT: %Convert.type.7ef: type = fn_type @Convert, @ImplicitAs(%I.type) [concrete]
  197. // CHECK:STDOUT: %Convert.c77: %Convert.type.7ef = struct_value () [concrete]
  198. // CHECK:STDOUT: %ImplicitAs.assoc_type.167: type = assoc_entity_type %ImplicitAs.type.c42 [concrete]
  199. // CHECK:STDOUT: %assoc0.0e0: %ImplicitAs.assoc_type.167 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
  200. // CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
  201. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  202. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  203. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type %J.type [concrete]
  204. // CHECK:STDOUT: %assoc0.ebc: %J.assoc_type = assoc_entity element0, @J.%F.decl [concrete]
  205. // CHECK:STDOUT: }
  206. // CHECK:STDOUT:
  207. // CHECK:STDOUT: imports {
  208. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  209. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  210. // CHECK:STDOUT: import Core//default
  211. // CHECK:STDOUT: }
  212. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
  213. // CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
  214. // CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
  215. // CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
  216. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
  217. // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
  218. // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  219. // CHECK:STDOUT: }
  220. // CHECK:STDOUT:
  221. // CHECK:STDOUT: file {
  222. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  223. // CHECK:STDOUT: .Core = imports.%Core
  224. // CHECK:STDOUT: .I = %I.decl
  225. // CHECK:STDOUT: .J = %J.decl
  226. // CHECK:STDOUT: }
  227. // CHECK:STDOUT: %Core.import = import Core
  228. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  229. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT:
  232. // CHECK:STDOUT: interface @I {
  233. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  234. // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
  235. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.c7e]
  236. // CHECK:STDOUT: }
  237. // CHECK:STDOUT:
  238. // CHECK:STDOUT: !members:
  239. // CHECK:STDOUT: .Self = %Self
  240. // CHECK:STDOUT: .T = @T.%assoc0
  241. // CHECK:STDOUT: witness = (%T)
  242. // CHECK:STDOUT: }
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: interface @J {
  245. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
  246. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  247. // CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0.c7e]
  248. // CHECK:STDOUT: %U: %I.assoc_type = bind_alias U, @T.%assoc0 [concrete = constants.%assoc0.c7e]
  249. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  250. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
  251. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
  252. // CHECK:STDOUT: } {
  253. // CHECK:STDOUT: %.loc18: %I.type = converted @J.%Self, <error> [concrete = <error>]
  254. // CHECK:STDOUT: %U.ref: <error> = name_ref U, <error> [concrete = <error>]
  255. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
  256. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.ebc]
  259. // CHECK:STDOUT:
  260. // CHECK:STDOUT: !members:
  261. // CHECK:STDOUT: .Self = %Self
  262. // CHECK:STDOUT: .I = <poisoned>
  263. // CHECK:STDOUT: .U = %U
  264. // CHECK:STDOUT: .F = %assoc0
  265. // CHECK:STDOUT: witness = (%F.decl)
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT:
  268. // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] {
  269. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  270. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  271. // CHECK:STDOUT:
  272. // CHECK:STDOUT: !definition:
  273. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  274. // CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  275. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
  276. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
  277. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
  278. // CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: interface {
  281. // CHECK:STDOUT: !members:
  282. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
  283. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.630
  284. // CHECK:STDOUT: witness = (imports.%Core.Convert)
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT: }
  287. // CHECK:STDOUT:
  288. // CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
  289. // CHECK:STDOUT: assoc_const T:! type;
  290. // CHECK:STDOUT: }
  291. // CHECK:STDOUT:
  292. // CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] {
  293. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  294. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  295. // CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  296. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type (%Self.as_type)]() -> @Convert.%Dest (%Dest);
  299. // CHECK:STDOUT: }
  300. // CHECK:STDOUT:
  301. // CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) {
  302. // CHECK:STDOUT: fn() -> <error>;
  303. // CHECK:STDOUT: }
  304. // CHECK:STDOUT:
  305. // CHECK:STDOUT: specific @T(constants.%Self.826) {}
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  308. // CHECK:STDOUT: %Dest => constants.%Dest
  309. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  310. // CHECK:STDOUT: }
  311. // CHECK:STDOUT:
  312. // CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
  313. // CHECK:STDOUT:
  314. // CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
  315. // CHECK:STDOUT:
  316. // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
  317. // CHECK:STDOUT: %Dest => constants.%Dest
  318. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62
  319. // CHECK:STDOUT: %Self => constants.%Self.519
  320. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
  321. // CHECK:STDOUT: }
  322. // CHECK:STDOUT:
  323. // CHECK:STDOUT: specific @ImplicitAs(constants.%I.type) {
  324. // CHECK:STDOUT: %Dest => constants.%I.type
  325. // CHECK:STDOUT: %Dest.patt => constants.%I.type
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: !definition:
  328. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.c42
  329. // CHECK:STDOUT: %Self => constants.%Self.519
  330. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.7ef
  331. // CHECK:STDOUT: %Convert => constants.%Convert.c77
  332. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.167
  333. // CHECK:STDOUT: %assoc0 => constants.%assoc0.0e0
  334. // CHECK:STDOUT: }
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: specific @F(constants.%Self.ccd) {}
  337. // CHECK:STDOUT:
  338. // CHECK:STDOUT: --- fail_todo_alias_to_different_interface_with_requires.carbon
  339. // CHECK:STDOUT:
  340. // CHECK:STDOUT: constants {
  341. // CHECK:STDOUT: %I2.type: type = facet_type <@I2> [concrete]
  342. // CHECK:STDOUT: %Self.c7b: %I2.type = bind_symbolic_name Self, 0 [symbolic]
  343. // CHECK:STDOUT: %I2.assoc_type: type = assoc_entity_type %I2.type [concrete]
  344. // CHECK:STDOUT: %assoc0.166: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete]
  345. // CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete]
  346. // CHECK:STDOUT: %V: %J2.type = bind_symbolic_name V, 0 [symbolic]
  347. // CHECK:STDOUT: %V.patt: %J2.type = symbolic_binding_pattern V, 0 [symbolic]
  348. // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
  349. // CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self]
  350. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  351. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
  352. // CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self, element0 [symbolic_self]
  353. // CHECK:STDOUT: %I2.facet: %I2.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self]
  354. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self]
  355. // CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0 = %empty_tuple.type> [concrete]
  356. // CHECK:STDOUT: %impl_witness.ec95d0.1: <witness> = impl_witness (%empty_tuple.type), @impl(%V) [symbolic]
  357. // CHECK:STDOUT: %Self.541: %J2.type = bind_symbolic_name Self, 0 [symbolic]
  358. // CHECK:STDOUT: %Self.as_type.f5c: type = facet_access_type %Self.541 [symbolic]
  359. // CHECK:STDOUT: %impl_witness.ec95d0.2: <witness> = impl_witness (%empty_tuple.type), @impl(%Self.541) [symbolic]
  360. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
  361. // CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
  362. // CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
  363. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
  364. // CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
  365. // CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
  366. // CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
  367. // CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
  368. // CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
  369. // CHECK:STDOUT: %ImplicitAs.type.2eb: type = facet_type <@ImplicitAs, @ImplicitAs(%I2.type)> [concrete]
  370. // CHECK:STDOUT: %Convert.type.b16: type = fn_type @Convert, @ImplicitAs(%I2.type) [concrete]
  371. // CHECK:STDOUT: %Convert.b2c: %Convert.type.b16 = struct_value () [concrete]
  372. // CHECK:STDOUT: %ImplicitAs.assoc_type.ede: type = assoc_entity_type %ImplicitAs.type.2eb [concrete]
  373. // CHECK:STDOUT: %assoc0.76a: %ImplicitAs.assoc_type.ede = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
  374. // CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
  375. // CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete]
  376. // CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete]
  377. // CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type %J2.type [concrete]
  378. // CHECK:STDOUT: %assoc0.5b2: %J2.assoc_type = assoc_entity element0, @J2.%F2.decl [concrete]
  379. // CHECK:STDOUT: }
  380. // CHECK:STDOUT:
  381. // CHECK:STDOUT: imports {
  382. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  383. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  384. // CHECK:STDOUT: import Core//default
  385. // CHECK:STDOUT: }
  386. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
  387. // CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
  388. // CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
  389. // CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
  390. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
  391. // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
  392. // CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  393. // CHECK:STDOUT: }
  394. // CHECK:STDOUT:
  395. // CHECK:STDOUT: file {
  396. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  397. // CHECK:STDOUT: .Core = imports.%Core
  398. // CHECK:STDOUT: .I2 = %I2.decl
  399. // CHECK:STDOUT: .J2 = %J2.decl.loc9
  400. // CHECK:STDOUT: }
  401. // CHECK:STDOUT: %Core.import = import Core
  402. // CHECK:STDOUT: %I2.decl: type = interface_decl @I2 [concrete = constants.%I2.type] {} {}
  403. // CHECK:STDOUT: %J2.decl.loc9: type = interface_decl @J2 [concrete = constants.%J2.type] {} {}
  404. // CHECK:STDOUT: impl_decl @impl [concrete] {
  405. // CHECK:STDOUT: %V.patt.loc11_14.1: %J2.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)]
  406. // CHECK:STDOUT: } {
  407. // CHECK:STDOUT: %V.ref: %J2.type = name_ref V, %V.loc11_14.1 [symbolic = %V.loc11_14.2 (constants.%V)]
  408. // CHECK:STDOUT: %V.as_type.loc11_22.1: type = facet_access_type %V.ref [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)]
  409. // CHECK:STDOUT: %.loc11_22: type = converted %V.ref, %V.as_type.loc11_22.1 [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)]
  410. // CHECK:STDOUT: %I2.ref: type = name_ref I2, file.%I2.decl [concrete = constants.%I2.type]
  411. // CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  412. // CHECK:STDOUT: %.Self.ref: %I2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  413. // CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.166]
  414. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
  415. // CHECK:STDOUT: %.loc11_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
  416. // CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
  417. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
  418. // CHECK:STDOUT: %.loc11_43.1: %empty_tuple.type = tuple_literal ()
  419. // CHECK:STDOUT: %.loc11_43.2: type = converted %.loc11_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  420. // CHECK:STDOUT: %.loc11_30: type = where_expr %.Self [concrete = constants.%I2_where.type] {
  421. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_43.2
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl.loc9 [concrete = constants.%J2.type]
  424. // CHECK:STDOUT: %V.loc11_14.1: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)]
  425. // CHECK:STDOUT: }
  426. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (constants.%empty_tuple.type), @impl(constants.%V) [symbolic = @impl.%impl_witness (constants.%impl_witness.ec95d0.1)]
  427. // CHECK:STDOUT: %J2.decl.loc13: type = interface_decl @J2 [concrete = constants.%J2.type] {} {}
  428. // CHECK:STDOUT: }
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: interface @I2 {
  431. // CHECK:STDOUT: %Self: %I2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.c7b]
  432. // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {
  433. // CHECK:STDOUT: %assoc0: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete = constants.%assoc0.166]
  434. // CHECK:STDOUT: }
  435. // CHECK:STDOUT:
  436. // CHECK:STDOUT: !members:
  437. // CHECK:STDOUT: .Self = %Self
  438. // CHECK:STDOUT: .T2 = @T2.%assoc0
  439. // CHECK:STDOUT: witness = (%T2)
  440. // CHECK:STDOUT: }
  441. // CHECK:STDOUT:
  442. // CHECK:STDOUT: interface @J2 {
  443. // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.541]
  444. // CHECK:STDOUT: %I2.ref: type = name_ref I2, file.%I2.decl [concrete = constants.%I2.type]
  445. // CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.166]
  446. // CHECK:STDOUT: %U2: %I2.assoc_type = bind_alias U2, @T2.%assoc0 [concrete = constants.%assoc0.166]
  447. // CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [concrete = constants.%F2] {
  448. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
  449. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
  450. // CHECK:STDOUT: } {
  451. // CHECK:STDOUT: %Self.as_type.loc22_14.2: type = facet_access_type constants.%Self.541 [symbolic = %Self.as_type.loc22_14.1 (constants.%Self.as_type.f5c)]
  452. // CHECK:STDOUT: %.loc22_14.1: type = converted constants.%Self.541, %Self.as_type.loc22_14.2 [symbolic = %Self.as_type.loc22_14.1 (constants.%Self.as_type.f5c)]
  453. // CHECK:STDOUT: %.loc22_14.2: %J2.type = converted %.loc22_14.1, constants.%Self.541 [symbolic = %Self (constants.%Self.541)]
  454. // CHECK:STDOUT: %.loc22_14.3: %I2.type = converted @J2.%Self, <error> [concrete = <error>]
  455. // CHECK:STDOUT: %U2.ref: <error> = name_ref U2, <error> [concrete = <error>]
  456. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
  457. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  458. // CHECK:STDOUT: }
  459. // CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, %F2.decl [concrete = constants.%assoc0.5b2]
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: !members:
  462. // CHECK:STDOUT: .Self = %Self
  463. // CHECK:STDOUT: .I2 = <poisoned>
  464. // CHECK:STDOUT: .U2 = %U2
  465. // CHECK:STDOUT: .F2 = %assoc0
  466. // CHECK:STDOUT: witness = (%F2.decl)
  467. // CHECK:STDOUT: }
  468. // CHECK:STDOUT:
  469. // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] {
  470. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  471. // CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
  472. // CHECK:STDOUT:
  473. // CHECK:STDOUT: !definition:
  474. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  475. // CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  476. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
  477. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
  478. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
  479. // CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: interface {
  482. // CHECK:STDOUT: !members:
  483. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
  484. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.630
  485. // CHECK:STDOUT: witness = (imports.%Core.Convert)
  486. // CHECK:STDOUT: }
  487. // CHECK:STDOUT: }
  488. // CHECK:STDOUT:
  489. // CHECK:STDOUT: generic assoc_const @T2(@I2.%Self: %I2.type) {
  490. // CHECK:STDOUT: assoc_const T2:! type;
  491. // CHECK:STDOUT: }
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: generic impl @impl(%V.loc11_14.1: %J2.type) {
  494. // CHECK:STDOUT: %V.loc11_14.2: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)]
  495. // CHECK:STDOUT: %V.patt.loc11_14.2: %J2.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)]
  496. // CHECK:STDOUT: %V.as_type.loc11_22.2: type = facet_access_type %V.loc11_14.2 [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)]
  497. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (constants.%empty_tuple.type), @impl(%V.loc11_14.2) [symbolic = %impl_witness (constants.%impl_witness.ec95d0.1)]
  498. // CHECK:STDOUT:
  499. // CHECK:STDOUT: !definition:
  500. // CHECK:STDOUT:
  501. // CHECK:STDOUT: impl: %.loc11_22 as %.loc11_30 {
  502. // CHECK:STDOUT: !members:
  503. // CHECK:STDOUT: witness = file.%impl_witness
  504. // CHECK:STDOUT: }
  505. // CHECK:STDOUT: }
  506. // CHECK:STDOUT:
  507. // CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] {
  508. // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
  509. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  510. // CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  511. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.40a)]
  512. // CHECK:STDOUT:
  513. // CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type (%Self.as_type.40a)]() -> @Convert.%Dest (%Dest);
  514. // CHECK:STDOUT: }
  515. // CHECK:STDOUT:
  516. // CHECK:STDOUT: generic fn @F2(@J2.%Self: %J2.type) {
  517. // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.541)]
  518. // CHECK:STDOUT: %Self.as_type.loc22_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc22_14.1 (constants.%Self.as_type.f5c)]
  519. // CHECK:STDOUT:
  520. // CHECK:STDOUT: fn() -> <error>;
  521. // CHECK:STDOUT: }
  522. // CHECK:STDOUT:
  523. // CHECK:STDOUT: specific @T2(constants.%Self.c7b) {}
  524. // CHECK:STDOUT:
  525. // CHECK:STDOUT: specific @T2(constants.%I2.facet) {}
  526. // CHECK:STDOUT:
  527. // CHECK:STDOUT: specific @impl(constants.%V) {
  528. // CHECK:STDOUT: %V.loc11_14.2 => constants.%V
  529. // CHECK:STDOUT: %V.patt.loc11_14.2 => constants.%V
  530. // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%V.as_type
  531. // CHECK:STDOUT: %impl_witness => constants.%impl_witness.ec95d0.1
  532. // CHECK:STDOUT: }
  533. // CHECK:STDOUT:
  534. // CHECK:STDOUT: specific @impl(%V.loc11_14.2) {}
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: specific @impl(constants.%Self.541) {
  537. // CHECK:STDOUT: %V.loc11_14.2 => constants.%Self.541
  538. // CHECK:STDOUT: %V.patt.loc11_14.2 => constants.%Self.541
  539. // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%Self.as_type.f5c
  540. // CHECK:STDOUT: %impl_witness => constants.%impl_witness.ec95d0.2
  541. // CHECK:STDOUT: }
  542. // CHECK:STDOUT:
  543. // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
  544. // CHECK:STDOUT: %Dest => constants.%Dest
  545. // CHECK:STDOUT: %Dest.patt => constants.%Dest
  546. // CHECK:STDOUT: }
  547. // CHECK:STDOUT:
  548. // CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
  549. // CHECK:STDOUT:
  550. // CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
  551. // CHECK:STDOUT:
  552. // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
  553. // CHECK:STDOUT: %Dest => constants.%Dest
  554. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62
  555. // CHECK:STDOUT: %Self => constants.%Self.519
  556. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.40a
  557. // CHECK:STDOUT: }
  558. // CHECK:STDOUT:
  559. // CHECK:STDOUT: specific @ImplicitAs(constants.%I2.type) {
  560. // CHECK:STDOUT: %Dest => constants.%I2.type
  561. // CHECK:STDOUT: %Dest.patt => constants.%I2.type
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: !definition:
  564. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2eb
  565. // CHECK:STDOUT: %Self => constants.%Self.519
  566. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.b16
  567. // CHECK:STDOUT: %Convert => constants.%Convert.b2c
  568. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.ede
  569. // CHECK:STDOUT: %assoc0 => constants.%assoc0.76a
  570. // CHECK:STDOUT: }
  571. // CHECK:STDOUT:
  572. // CHECK:STDOUT: specific @F2(constants.%Self.541) {
  573. // CHECK:STDOUT: %Self => constants.%Self.541
  574. // CHECK:STDOUT: %Self.as_type.loc22_14.1 => constants.%Self.as_type.f5c
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: --- fail_call_method_alias.carbon
  578. // CHECK:STDOUT:
  579. // CHECK:STDOUT: constants {
  580. // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
  581. // CHECK:STDOUT: %Self.31d: %A.type = bind_symbolic_name Self, 0 [symbolic]
  582. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.31d [symbolic]
  583. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  584. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  585. // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type %A.type [concrete]
  586. // CHECK:STDOUT: %assoc0.70d: %A.assoc_type = assoc_entity element0, @A.%F.decl [concrete]
  587. // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete]
  588. // CHECK:STDOUT: %Self.783: %B.type = bind_symbolic_name Self, 0 [symbolic]
  589. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  590. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  591. // CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type %B.type [concrete]
  592. // CHECK:STDOUT: %assoc0.c1f: %B.assoc_type = assoc_entity element0, @B.%G.decl [concrete]
  593. // CHECK:STDOUT: }
  594. // CHECK:STDOUT:
  595. // CHECK:STDOUT: imports {
  596. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  597. // CHECK:STDOUT: import Core//default
  598. // CHECK:STDOUT: }
  599. // CHECK:STDOUT: }
  600. // CHECK:STDOUT:
  601. // CHECK:STDOUT: file {
  602. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  603. // CHECK:STDOUT: .Core = imports.%Core
  604. // CHECK:STDOUT: .A = %A.decl
  605. // CHECK:STDOUT: .B = %B.decl
  606. // CHECK:STDOUT: }
  607. // CHECK:STDOUT: %Core.import = import Core
  608. // CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
  609. // CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {}
  610. // CHECK:STDOUT: }
  611. // CHECK:STDOUT:
  612. // CHECK:STDOUT: interface @A {
  613. // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.31d]
  614. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  615. // CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = binding_pattern self
  616. // CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
  617. // CHECK:STDOUT: %return.patt: type = return_slot_pattern
  618. // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param1
  619. // CHECK:STDOUT: } {
  620. // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param call_param0
  621. // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)] {
  622. // CHECK:STDOUT: %Self.ref: %A.type = name_ref Self, @A.%Self [symbolic = %Self (constants.%Self.31d)]
  623. // CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
  624. // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
  625. // CHECK:STDOUT: }
  626. // CHECK:STDOUT: %self: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = bind_name self, %self.param
  627. // CHECK:STDOUT: %return.param: ref type = out_param call_param1
  628. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  629. // CHECK:STDOUT: }
  630. // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.70d]
  631. // CHECK:STDOUT:
  632. // CHECK:STDOUT: !members:
  633. // CHECK:STDOUT: .Self = %Self
  634. // CHECK:STDOUT: .F = %assoc0
  635. // CHECK:STDOUT: witness = (%F.decl)
  636. // CHECK:STDOUT: }
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: interface @B {
  639. // CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.783]
  640. // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
  641. // CHECK:STDOUT: %F.ref: %A.assoc_type = name_ref F, @A.%assoc0 [concrete = constants.%assoc0.70d]
  642. // CHECK:STDOUT: %F: %A.assoc_type = bind_alias F, @A.%assoc0 [concrete = constants.%assoc0.70d]
  643. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  644. // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
  645. // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
  646. // CHECK:STDOUT: } {
  647. // CHECK:STDOUT: %F.ref: <error> = name_ref F, <error> [concrete = <error>]
  648. // CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
  649. // CHECK:STDOUT: %return: ref <error> = return_slot %return.param
  650. // CHECK:STDOUT: }
  651. // CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %G.decl [concrete = constants.%assoc0.c1f]
  652. // CHECK:STDOUT:
  653. // CHECK:STDOUT: !members:
  654. // CHECK:STDOUT: .Self = %Self
  655. // CHECK:STDOUT: .A = <poisoned>
  656. // CHECK:STDOUT: .F = %F
  657. // CHECK:STDOUT: .G = %assoc0
  658. // CHECK:STDOUT: witness = (%G.decl)
  659. // CHECK:STDOUT: }
  660. // CHECK:STDOUT:
  661. // CHECK:STDOUT: generic fn @F(@A.%Self: %A.type) {
  662. // CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.31d)]
  663. // CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
  664. // CHECK:STDOUT:
  665. // CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type)]() -> type;
  666. // CHECK:STDOUT: }
  667. // CHECK:STDOUT:
  668. // CHECK:STDOUT: generic fn @G(@B.%Self: %B.type) {
  669. // CHECK:STDOUT: fn() -> <error>;
  670. // CHECK:STDOUT: }
  671. // CHECK:STDOUT:
  672. // CHECK:STDOUT: specific @F(constants.%Self.31d) {
  673. // CHECK:STDOUT: %Self => constants.%Self.31d
  674. // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
  675. // CHECK:STDOUT: }
  676. // CHECK:STDOUT:
  677. // CHECK:STDOUT: specific @G(constants.%Self.783) {}
  678. // CHECK:STDOUT:
  679. // CHECK:STDOUT: --- fail_todo_call_with_compound_member_access.carbon
  680. // CHECK:STDOUT:
  681. // CHECK:STDOUT: constants {
  682. // CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete]
  683. // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic]
  684. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  685. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  686. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  687. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  688. // CHECK:STDOUT: %C.assoc_type: type = assoc_entity_type %C.type [concrete]
  689. // CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, @C.%F.decl [concrete]
  690. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  691. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  692. // CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, @C.%G.decl [concrete]
  693. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic]
  694. // CHECK:STDOUT: %Self.as_wit.iface0: <witness> = facet_access_witness %Self, element0 [symbolic]
  695. // CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic]
  696. // CHECK:STDOUT: %.70a: type = fn_type_with_self_type %F.type, %C.facet [symbolic]
  697. // CHECK:STDOUT: %impl.elem0: %.70a = impl_witness_access %Self.as_wit.iface0, element0 [symbolic]
  698. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @F(%C.facet) [symbolic]
  699. // CHECK:STDOUT: }
  700. // CHECK:STDOUT:
  701. // CHECK:STDOUT: imports {
  702. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  703. // CHECK:STDOUT: import Core//default
  704. // CHECK:STDOUT: }
  705. // CHECK:STDOUT: }
  706. // CHECK:STDOUT:
  707. // CHECK:STDOUT: file {
  708. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  709. // CHECK:STDOUT: .Core = imports.%Core
  710. // CHECK:STDOUT: .C = %C.decl
  711. // CHECK:STDOUT: }
  712. // CHECK:STDOUT: %Core.import = import Core
  713. // CHECK:STDOUT: %C.decl: type = interface_decl @C [concrete = constants.%C.type] {} {}
  714. // CHECK:STDOUT: }
  715. // CHECK:STDOUT:
  716. // CHECK:STDOUT: interface @C {
  717. // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
  718. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  719. // CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = binding_pattern self
  720. // CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
  721. // CHECK:STDOUT: } {
  722. // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param call_param0
  723. // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)] {
  724. // CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self [symbolic = %Self (constants.%Self)]
  725. // CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
  726. // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
  727. // CHECK:STDOUT: }
  728. // CHECK:STDOUT: %self: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = bind_name self, %self.param
  729. // CHECK:STDOUT: }
  730. // CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0]
  731. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
  732. // CHECK:STDOUT: %self.patt: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = binding_pattern self
  733. // CHECK:STDOUT: %self.param_patt: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
  734. // CHECK:STDOUT: } {
  735. // CHECK:STDOUT: %self.param: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = value_param call_param0
  736. // CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)] {
  737. // CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self [symbolic = %Self (constants.%Self)]
  738. // CHECK:STDOUT: %Self.as_type.loc8_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
  739. // CHECK:STDOUT: %.loc8_14.2: type = converted %Self.ref, %Self.as_type.loc8_14.2 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
  740. // CHECK:STDOUT: }
  741. // CHECK:STDOUT: %self: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = bind_name self, %self.param
  742. // CHECK:STDOUT: }
  743. // CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
  744. // CHECK:STDOUT:
  745. // CHECK:STDOUT: !members:
  746. // CHECK:STDOUT: .Self = %Self
  747. // CHECK:STDOUT: .F = %assoc0
  748. // CHECK:STDOUT: .G = %assoc1
  749. // CHECK:STDOUT: witness = (%F.decl, %G.decl)
  750. // CHECK:STDOUT: }
  751. // CHECK:STDOUT:
  752. // CHECK:STDOUT: generic fn @F(@C.%Self: %C.type) {
  753. // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  754. // CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
  755. // CHECK:STDOUT:
  756. // CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type)]();
  757. // CHECK:STDOUT: }
  758. // CHECK:STDOUT:
  759. // CHECK:STDOUT: generic fn @G(@C.%Self: %C.type) {
  760. // CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
  761. // CHECK:STDOUT: %Self.as_type.loc8_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
  762. // CHECK:STDOUT:
  763. // CHECK:STDOUT: !definition:
  764. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @G.%Self.as_type.loc8_14.1 (%Self.as_type) [symbolic = %require_complete (constants.%require_complete)]
  765. // CHECK:STDOUT: %Self.as_wit.iface0.loc10_9.2: <witness> = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc10_9.2 (constants.%Self.as_wit.iface0)]
  766. // CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type.loc8_14.1, (%Self.as_wit.iface0.loc10_9.2) [symbolic = %C.facet (constants.%C.facet)]
  767. // CHECK:STDOUT: %.loc10_9.2: type = fn_type_with_self_type constants.%F.type, %C.facet [symbolic = %.loc10_9.2 (constants.%.70a)]
  768. // CHECK:STDOUT: %impl.elem0.loc10_9.2: @G.%.loc10_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc10_9.2, element0 [symbolic = %impl.elem0.loc10_9.2 (constants.%impl.elem0)]
  769. // CHECK:STDOUT: %specific_fn.loc10_9.2: <specific function> = specific_function %impl.elem0.loc10_9.2, @F(%C.facet) [symbolic = %specific_fn.loc10_9.2 (constants.%specific_fn)]
  770. // CHECK:STDOUT:
  771. // CHECK:STDOUT: fn[%self.param_patt: @G.%Self.as_type.loc8_14.1 (%Self.as_type)]() {
  772. // CHECK:STDOUT: !entry:
  773. // CHECK:STDOUT: %self.ref.loc10: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self
  774. // CHECK:STDOUT: %F.ref.loc10: %C.assoc_type = name_ref F, @C.%assoc0 [concrete = constants.%assoc0]
  775. // CHECK:STDOUT: %Self.as_type.loc10: type = facet_access_type constants.%Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
  776. // CHECK:STDOUT: %.loc10_9.1: type = converted constants.%Self, %Self.as_type.loc10 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
  777. // CHECK:STDOUT: %Self.as_wit.iface0.loc10_9.1: <witness> = facet_access_witness constants.%Self, element0 [symbolic = %Self.as_wit.iface0.loc10_9.2 (constants.%Self.as_wit.iface0)]
  778. // CHECK:STDOUT: %impl.elem0.loc10_9.1: @G.%.loc10_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc10_9.1, element0 [symbolic = %impl.elem0.loc10_9.2 (constants.%impl.elem0)]
  779. // CHECK:STDOUT: %bound_method.loc10_9: <bound method> = bound_method %self.ref.loc10, %impl.elem0.loc10_9.1
  780. // CHECK:STDOUT: %specific_fn.loc10_9.1: <specific function> = specific_function %impl.elem0.loc10_9.1, @F(constants.%C.facet) [symbolic = %specific_fn.loc10_9.2 (constants.%specific_fn)]
  781. // CHECK:STDOUT: %bound_method.loc10_12: <bound method> = bound_method %self.ref.loc10, %specific_fn.loc10_9.1
  782. // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method.loc10_12(%self.ref.loc10)
  783. // CHECK:STDOUT: %self.ref.loc15: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self
  784. // CHECK:STDOUT: %F.ref.loc15: <error> = name_ref F, <error> [concrete = <error>]
  785. // CHECK:STDOUT: return
  786. // CHECK:STDOUT: }
  787. // CHECK:STDOUT: }
  788. // CHECK:STDOUT:
  789. // CHECK:STDOUT: specific @F(constants.%Self) {
  790. // CHECK:STDOUT: %Self => constants.%Self
  791. // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
  792. // CHECK:STDOUT: }
  793. // CHECK:STDOUT:
  794. // CHECK:STDOUT: specific @G(constants.%Self) {
  795. // CHECK:STDOUT: %Self => constants.%Self
  796. // CHECK:STDOUT: %Self.as_type.loc8_14.1 => constants.%Self.as_type
  797. // CHECK:STDOUT: }
  798. // CHECK:STDOUT:
  799. // CHECK:STDOUT: specific @F(constants.%C.facet) {
  800. // CHECK:STDOUT: %Self => constants.%C.facet
  801. // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
  802. // CHECK:STDOUT: }
  803. // CHECK:STDOUT:
  804. // CHECK:STDOUT: specific @F(@G.%C.facet) {}
  805. // CHECK:STDOUT: