canonical_query_self.carbon 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  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/canonical_query_self.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/canonical_query_self.carbon
  14. interface I {
  15. fn II[self: Self]();
  16. }
  17. interface J {
  18. fn JJ[self: Self]();
  19. }
  20. fn F(T:! I & J, t: T) {
  21. // Nesting FacetValue and FacetAccessTypes, the `lookup_impl_witness`
  22. // instructions should remain canonical, pointing symbolically to `T`, and not
  23. // include these conversions.
  24. (t as (((((((T as I) as type) as J) as type) as I) as type) as J)).JJ();
  25. }
  26. fn G() {
  27. class C {
  28. extend impl as I {
  29. fn II[self: Self]() {}
  30. }
  31. extend impl as J {
  32. fn JJ[self: Self]() {}
  33. }
  34. }
  35. // Nesting FacetValue and FacetAccessTypes, the impl lookup for `JJ` resolves
  36. // to a canonical `impl_witness` for the `impl C as J`.
  37. (({} as C) as (((((((C as I) as type) as J) as type) as I) as type) as J)).JJ();
  38. // Produces a specific for `F` with a `FacetValue` to replace the
  39. // `BindSymbolicName` parameter `T` when evaluated. The `lookup_impl_witness`
  40. // instructions should be replaced in the specific with concrete
  41. // `impl_witness` instructions for `impl C as I` and `impl C as J`.
  42. F(C, {} as C);
  43. }
  44. // CHECK:STDOUT: --- canonical_query_self.carbon
  45. // CHECK:STDOUT:
  46. // CHECK:STDOUT: constants {
  47. // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
  48. // CHECK:STDOUT: %Self.7ee: %I.type = bind_symbolic_name Self, 0 [symbolic]
  49. // CHECK:STDOUT: %Self.binding.as_type.1b7: type = symbolic_binding_type Self, 0, %Self.7ee [symbolic]
  50. // CHECK:STDOUT: %pattern_type.3f7: type = pattern_type %Self.binding.as_type.1b7 [symbolic]
  51. // CHECK:STDOUT: %I.II.type: type = fn_type @I.II [concrete]
  52. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  53. // CHECK:STDOUT: %I.II: %I.II.type = struct_value () [concrete]
  54. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete]
  55. // CHECK:STDOUT: %assoc0.82e: %I.assoc_type = assoc_entity element0, @I.%I.II.decl [concrete]
  56. // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
  57. // CHECK:STDOUT: %Self.bf6: %J.type = bind_symbolic_name Self, 0 [symbolic]
  58. // CHECK:STDOUT: %Self.binding.as_type.09d: type = symbolic_binding_type Self, 0, %Self.bf6 [symbolic]
  59. // CHECK:STDOUT: %pattern_type.a23: type = pattern_type %Self.binding.as_type.09d [symbolic]
  60. // CHECK:STDOUT: %J.JJ.type: type = fn_type @J.JJ [concrete]
  61. // CHECK:STDOUT: %J.JJ: %J.JJ.type = struct_value () [concrete]
  62. // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete]
  63. // CHECK:STDOUT: %assoc0.78c: %J.assoc_type = assoc_entity element0, @J.%J.JJ.decl [concrete]
  64. // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
  65. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self]
  66. // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete]
  67. // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete]
  68. // CHECK:STDOUT: %BitAndWith.type.8a6: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete]
  69. // CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete]
  70. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  71. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.8a6 = facet_value type, (%BitAndWith.impl_witness) [concrete]
  72. // CHECK:STDOUT: %.fa7: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete]
  73. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete]
  74. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  75. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete]
  76. // CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete]
  77. // CHECK:STDOUT: %T: %facet_type = bind_symbolic_name T, 0 [symbolic]
  78. // CHECK:STDOUT: %pattern_type.add: type = pattern_type %facet_type [concrete]
  79. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
  80. // CHECK:STDOUT: %pattern_type.038: type = pattern_type %T.binding.as_type [symbolic]
  81. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  82. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  83. // CHECK:STDOUT: %require_complete.920: <witness> = require_complete_type %T.binding.as_type [symbolic]
  84. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T, @I [symbolic]
  85. // CHECK:STDOUT: %I.facet.300: %I.type = facet_value %T.binding.as_type, (%I.lookup_impl_witness) [symbolic]
  86. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T, @J [symbolic]
  87. // CHECK:STDOUT: %J.facet.861: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness) [symbolic]
  88. // CHECK:STDOUT: %.c29: type = fn_type_with_self_type %J.JJ.type, %J.facet.861 [symbolic]
  89. // CHECK:STDOUT: %impl.elem0: %.c29 = impl_witness_access %J.lookup_impl_witness, element0 [symbolic]
  90. // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_function %impl.elem0, @J.JJ(%J.facet.861) [symbolic]
  91. // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
  92. // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
  93. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  94. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @C.%I.impl_witness_table [concrete]
  95. // CHECK:STDOUT: %pattern_type.893: type = pattern_type %C [concrete]
  96. // CHECK:STDOUT: %C.as.I.impl.II.type: type = fn_type @C.as.I.impl.II [concrete]
  97. // CHECK:STDOUT: %C.as.I.impl.II: %C.as.I.impl.II.type = struct_value () [concrete]
  98. // CHECK:STDOUT: %I.facet.0a4: %I.type = facet_value %C, (%I.impl_witness) [concrete]
  99. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness @C.%J.impl_witness_table [concrete]
  100. // CHECK:STDOUT: %C.as.J.impl.JJ.type: type = fn_type @C.as.J.impl.JJ [concrete]
  101. // CHECK:STDOUT: %C.as.J.impl.JJ: %C.as.J.impl.JJ.type = struct_value () [concrete]
  102. // CHECK:STDOUT: %J.facet.5ad: %J.type = facet_value %C, (%J.impl_witness) [concrete]
  103. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  104. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
  105. // CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
  106. // CHECK:STDOUT: %.be8: type = fn_type_with_self_type %J.JJ.type, %J.facet.5ad [concrete]
  107. // CHECK:STDOUT: %facet_value.d36: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete]
  108. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F, @F(%facet_value.d36) [concrete]
  109. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  110. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanDestroy>> [concrete]
  111. // CHECK:STDOUT: %facet_value.c6b: %type_where = facet_value %C, () [concrete]
  112. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.73c: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.c6b) [concrete]
  113. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.fbd: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.73c = struct_value () [concrete]
  114. // CHECK:STDOUT: %ptr.8e6: type = ptr_type %C [concrete]
  115. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.fbd, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.c6b) [concrete]
  116. // CHECK:STDOUT: }
  117. // CHECK:STDOUT:
  118. // CHECK:STDOUT: imports {
  119. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  120. // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith
  121. // CHECK:STDOUT: .Destroy = %Core.Destroy
  122. // CHECK:STDOUT: import Core//prelude
  123. // CHECK:STDOUT: import Core//prelude/...
  124. // CHECK:STDOUT: }
  125. // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.f2e = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic]
  126. // CHECK:STDOUT: %Core.import_ref.636: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op]
  127. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.636), @type.as.BitAndWith.impl [concrete]
  128. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  129. // CHECK:STDOUT: }
  130. // CHECK:STDOUT:
  131. // CHECK:STDOUT: file {
  132. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  133. // CHECK:STDOUT: .Core = imports.%Core
  134. // CHECK:STDOUT: .I = %I.decl
  135. // CHECK:STDOUT: .J = %J.decl
  136. // CHECK:STDOUT: .F = %F.decl
  137. // CHECK:STDOUT: .G = %G.decl
  138. // CHECK:STDOUT: }
  139. // CHECK:STDOUT: %Core.import = import Core
  140. // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
  141. // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
  142. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
  143. // CHECK:STDOUT: %T.patt: %pattern_type.add = symbolic_binding_pattern T, 0 [concrete]
  144. // CHECK:STDOUT: %t.patt: @F.%pattern_type (%pattern_type.038) = binding_pattern t [concrete]
  145. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type (%pattern_type.038) = value_param_pattern %t.patt, call_param0 [concrete]
  146. // CHECK:STDOUT: } {
  147. // CHECK:STDOUT: %.loc22_12.1: type = splice_block %.loc22_12.3 [concrete = constants.%facet_type] {
  148. // CHECK:STDOUT: %.Self: %type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
  149. // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  150. // CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  151. // CHECK:STDOUT: %impl.elem0.loc22: %.fa7 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op]
  152. // CHECK:STDOUT: %bound_method.loc22: <bound method> = bound_method %I.ref.loc22, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound]
  153. // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type]
  154. // CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type]
  155. // CHECK:STDOUT: %.loc22_12.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_12.2 [concrete = constants.%facet_type]
  156. // CHECK:STDOUT: }
  157. // CHECK:STDOUT: %T.loc22_6.2: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T)]
  158. // CHECK:STDOUT: %t.param: @F.%T.binding.as_type (%T.binding.as_type) = value_param call_param0
  159. // CHECK:STDOUT: %.loc22_20.1: type = splice_block %.loc22_20.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] {
  160. // CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T)]
  161. // CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  162. // CHECK:STDOUT: %.loc22_20.2: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT: %t: @F.%T.binding.as_type (%T.binding.as_type) = bind_name t, %t.param
  165. // CHECK:STDOUT: }
  166. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {}
  167. // CHECK:STDOUT: }
  168. // CHECK:STDOUT:
  169. // CHECK:STDOUT: interface @I {
  170. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.7ee]
  171. // CHECK:STDOUT: %I.II.decl: %I.II.type = fn_decl @I.II [concrete = constants.%I.II] {
  172. // CHECK:STDOUT: %self.patt: @I.II.%pattern_type (%pattern_type.3f7) = binding_pattern self [concrete]
  173. // CHECK:STDOUT: %self.param_patt: @I.II.%pattern_type (%pattern_type.3f7) = value_param_pattern %self.patt, call_param0 [concrete]
  174. // CHECK:STDOUT: } {
  175. // CHECK:STDOUT: %self.param: @I.II.%Self.binding.as_type (%Self.binding.as_type.1b7) = value_param call_param0
  176. // CHECK:STDOUT: %.loc16_15.1: type = splice_block %.loc16_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1b7)] {
  177. // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.7ee)]
  178. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1b7)]
  179. // CHECK:STDOUT: %.loc16_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1b7)]
  180. // CHECK:STDOUT: }
  181. // CHECK:STDOUT: %self: @I.II.%Self.binding.as_type (%Self.binding.as_type.1b7) = bind_name self, %self.param
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.II.decl [concrete = constants.%assoc0.82e]
  184. // CHECK:STDOUT:
  185. // CHECK:STDOUT: !members:
  186. // CHECK:STDOUT: .Self = %Self
  187. // CHECK:STDOUT: .II = %assoc0
  188. // CHECK:STDOUT: .JJ = <poisoned>
  189. // CHECK:STDOUT: .J = <poisoned>
  190. // CHECK:STDOUT: witness = (%I.II.decl)
  191. // CHECK:STDOUT: }
  192. // CHECK:STDOUT:
  193. // CHECK:STDOUT: interface @J {
  194. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.bf6]
  195. // CHECK:STDOUT: %J.JJ.decl: %J.JJ.type = fn_decl @J.JJ [concrete = constants.%J.JJ] {
  196. // CHECK:STDOUT: %self.patt: @J.JJ.%pattern_type (%pattern_type.a23) = binding_pattern self [concrete]
  197. // CHECK:STDOUT: %self.param_patt: @J.JJ.%pattern_type (%pattern_type.a23) = value_param_pattern %self.patt, call_param0 [concrete]
  198. // CHECK:STDOUT: } {
  199. // CHECK:STDOUT: %self.param: @J.JJ.%Self.binding.as_type (%Self.binding.as_type.09d) = value_param call_param0
  200. // CHECK:STDOUT: %.loc19_15.1: type = splice_block %.loc19_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.09d)] {
  201. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.bf6)]
  202. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.09d)]
  203. // CHECK:STDOUT: %.loc19_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.09d)]
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT: %self: @J.JJ.%Self.binding.as_type (%Self.binding.as_type.09d) = bind_name self, %self.param
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.JJ.decl [concrete = constants.%assoc0.78c]
  208. // CHECK:STDOUT:
  209. // CHECK:STDOUT: !members:
  210. // CHECK:STDOUT: .Self = %Self
  211. // CHECK:STDOUT: .JJ = %assoc0
  212. // CHECK:STDOUT: witness = (%J.JJ.decl)
  213. // CHECK:STDOUT: }
  214. // CHECK:STDOUT:
  215. // CHECK:STDOUT: impl @C.as.I.impl: %Self.ref as %I.ref {
  216. // CHECK:STDOUT: %C.as.I.impl.II.decl: %C.as.I.impl.II.type = fn_decl @C.as.I.impl.II [concrete = constants.%C.as.I.impl.II] {
  217. // CHECK:STDOUT: %self.patt: %pattern_type.893 = binding_pattern self [concrete]
  218. // CHECK:STDOUT: %self.param_patt: %pattern_type.893 = value_param_pattern %self.patt, call_param0 [concrete]
  219. // CHECK:STDOUT: } {
  220. // CHECK:STDOUT: %self.param: %C = value_param call_param0
  221. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  222. // CHECK:STDOUT: %self: %C = bind_name self, %self.param
  223. // CHECK:STDOUT: }
  224. // CHECK:STDOUT:
  225. // CHECK:STDOUT: !members:
  226. // CHECK:STDOUT: .II = %C.as.I.impl.II.decl
  227. // CHECK:STDOUT: witness = @C.%I.impl_witness
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT:
  230. // CHECK:STDOUT: impl @C.as.J.impl: %Self.ref as %J.ref {
  231. // CHECK:STDOUT: %C.as.J.impl.JJ.decl: %C.as.J.impl.JJ.type = fn_decl @C.as.J.impl.JJ [concrete = constants.%C.as.J.impl.JJ] {
  232. // CHECK:STDOUT: %self.patt: %pattern_type.893 = binding_pattern self [concrete]
  233. // CHECK:STDOUT: %self.param_patt: %pattern_type.893 = value_param_pattern %self.patt, call_param0 [concrete]
  234. // CHECK:STDOUT: } {
  235. // CHECK:STDOUT: %self.param: %C = value_param call_param0
  236. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  237. // CHECK:STDOUT: %self: %C = bind_name self, %self.param
  238. // CHECK:STDOUT: }
  239. // CHECK:STDOUT:
  240. // CHECK:STDOUT: !members:
  241. // CHECK:STDOUT: .JJ = %C.as.J.impl.JJ.decl
  242. // CHECK:STDOUT: witness = @C.%J.impl_witness
  243. // CHECK:STDOUT: }
  244. // CHECK:STDOUT:
  245. // CHECK:STDOUT: class @C {
  246. // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} {
  247. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  248. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  249. // CHECK:STDOUT: }
  250. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@C.as.I.impl.%C.as.I.impl.II.decl), @C.as.I.impl [concrete]
  251. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  252. // CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} {
  253. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  254. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  255. // CHECK:STDOUT: }
  256. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@C.as.J.impl.%C.as.J.impl.JJ.decl), @C.as.J.impl [concrete]
  257. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  258. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
  259. // CHECK:STDOUT: complete_type_witness = %complete_type
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: !members:
  262. // CHECK:STDOUT: .Self = constants.%C
  263. // CHECK:STDOUT: .I = <poisoned>
  264. // CHECK:STDOUT: .J = <poisoned>
  265. // CHECK:STDOUT: .JJ = <poisoned>
  266. // CHECK:STDOUT: extend @C.as.I.impl.%I.ref
  267. // CHECK:STDOUT: extend @C.as.J.impl.%J.ref
  268. // CHECK:STDOUT: }
  269. // CHECK:STDOUT:
  270. // CHECK:STDOUT: generic fn @I.II(@I.%Self: %I.type) {
  271. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.7ee)]
  272. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.1b7)]
  273. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.3f7)]
  274. // CHECK:STDOUT:
  275. // CHECK:STDOUT: fn(%self.param: @I.II.%Self.binding.as_type (%Self.binding.as_type.1b7));
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: generic fn @J.JJ(@J.%Self: %J.type) {
  279. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.bf6)]
  280. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.09d)]
  281. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.a23)]
  282. // CHECK:STDOUT:
  283. // CHECK:STDOUT: fn(%self.param: @J.JJ.%Self.binding.as_type (%Self.binding.as_type.09d));
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT:
  286. // CHECK:STDOUT: generic fn @F(%T.loc22_6.2: %facet_type) {
  287. // CHECK:STDOUT: %T.loc22_6.1: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T)]
  288. // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc22_6.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  289. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.038)]
  290. // CHECK:STDOUT:
  291. // CHECK:STDOUT: !definition:
  292. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.920)]
  293. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc22_6.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)]
  294. // CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.binding.as_type, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.300)]
  295. // CHECK:STDOUT: %J.lookup_impl_witness: <witness> = lookup_impl_witness %T.loc22_6.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)]
  296. // CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.861)]
  297. // CHECK:STDOUT: %.loc26_69: type = fn_type_with_self_type constants.%J.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69 (constants.%.c29)]
  298. // CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69 (%.c29) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)]
  299. // CHECK:STDOUT: %specific_impl_fn.loc26_69.2: <specific function> = specific_impl_function %impl.elem0.loc26_69.2, @J.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)]
  300. // CHECK:STDOUT:
  301. // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type)) {
  302. // CHECK:STDOUT: !entry:
  303. // CHECK:STDOUT: %t.ref: @F.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t
  304. // CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T)]
  305. // CHECK:STDOUT: %I.ref.loc26_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  306. // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  307. // CHECK:STDOUT: %I.facet.loc26_18.1: %I.type = facet_value %T.as_type.loc26, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.300)]
  308. // CHECK:STDOUT: %.loc26_18: %I.type = converted %T.ref.loc26, %I.facet.loc26_18.1 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.300)]
  309. // CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  310. // CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  311. // CHECK:STDOUT: %J.ref.loc26_36: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  312. // CHECK:STDOUT: %J.facet.loc26_33.1: %J.type = facet_value %.loc26_24, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.861)]
  313. // CHECK:STDOUT: %.loc26_33: %J.type = converted %.loc26_24, %J.facet.loc26_33.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.861)]
  314. // CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  315. // CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  316. // CHECK:STDOUT: %I.ref.loc26_51: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  317. // CHECK:STDOUT: %I.facet.loc26_48: %I.type = facet_value %.loc26_39, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.300)]
  318. // CHECK:STDOUT: %.loc26_48: %I.type = converted %.loc26_39, %I.facet.loc26_48 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.300)]
  319. // CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  320. // CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  321. // CHECK:STDOUT: %J.ref.loc26_66: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  322. // CHECK:STDOUT: %J.facet.loc26_63: %J.type = facet_value %.loc26_54, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.861)]
  323. // CHECK:STDOUT: %.loc26_63: %J.type = converted %.loc26_54, %J.facet.loc26_63 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.861)]
  324. // CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  325. // CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)]
  326. // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c]
  327. // CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69 (%.c29) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)]
  328. // CHECK:STDOUT: %bound_method.loc26_69: <bound method> = bound_method %t.ref, %impl.elem0.loc26_69.1
  329. // CHECK:STDOUT: %specific_impl_fn.loc26_69.1: <specific function> = specific_impl_function %impl.elem0.loc26_69.1, @J.JJ(constants.%J.facet.861) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)]
  330. // CHECK:STDOUT: %bound_method.loc26_73: <bound method> = bound_method %t.ref, %specific_impl_fn.loc26_69.1
  331. // CHECK:STDOUT: %.loc26_73: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref)
  332. // CHECK:STDOUT: return
  333. // CHECK:STDOUT: }
  334. // CHECK:STDOUT: }
  335. // CHECK:STDOUT:
  336. // CHECK:STDOUT: fn @G() {
  337. // CHECK:STDOUT: !entry:
  338. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  339. // CHECK:STDOUT: %.loc40_6.1: %empty_struct_type = struct_literal ()
  340. // CHECK:STDOUT: %C.ref.loc40_11: type = name_ref C, %C.decl [concrete = constants.%C]
  341. // CHECK:STDOUT: %.loc40_6.2: ref %C = temporary_storage
  342. // CHECK:STDOUT: %.loc40_6.3: init %C = class_init (), %.loc40_6.2 [concrete = constants.%C.val]
  343. // CHECK:STDOUT: %.loc40_6.4: ref %C = temporary %.loc40_6.2, %.loc40_6.3
  344. // CHECK:STDOUT: %.loc40_8.1: ref %C = converted %.loc40_6.1, %.loc40_6.4
  345. // CHECK:STDOUT: %C.ref.loc40_24: type = name_ref C, %C.decl [concrete = constants.%C]
  346. // CHECK:STDOUT: %I.ref.loc40_29: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  347. // CHECK:STDOUT: %I.facet.loc40_26: %I.type = facet_value %C.ref.loc40_24, (constants.%I.impl_witness) [concrete = constants.%I.facet.0a4]
  348. // CHECK:STDOUT: %.loc40_26: %I.type = converted %C.ref.loc40_24, %I.facet.loc40_26 [concrete = constants.%I.facet.0a4]
  349. // CHECK:STDOUT: %as_type.loc40_32: type = facet_access_type %.loc40_26 [concrete = constants.%C]
  350. // CHECK:STDOUT: %.loc40_32: type = converted %.loc40_26, %as_type.loc40_32 [concrete = constants.%C]
  351. // CHECK:STDOUT: %J.ref.loc40_44: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  352. // CHECK:STDOUT: %J.facet.loc40_41: %J.type = facet_value %.loc40_32, (constants.%J.impl_witness) [concrete = constants.%J.facet.5ad]
  353. // CHECK:STDOUT: %.loc40_41: %J.type = converted %.loc40_32, %J.facet.loc40_41 [concrete = constants.%J.facet.5ad]
  354. // CHECK:STDOUT: %as_type.loc40_47: type = facet_access_type %.loc40_41 [concrete = constants.%C]
  355. // CHECK:STDOUT: %.loc40_47: type = converted %.loc40_41, %as_type.loc40_47 [concrete = constants.%C]
  356. // CHECK:STDOUT: %I.ref.loc40_59: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  357. // CHECK:STDOUT: %I.facet.loc40_56: %I.type = facet_value %.loc40_47, (constants.%I.impl_witness) [concrete = constants.%I.facet.0a4]
  358. // CHECK:STDOUT: %.loc40_56: %I.type = converted %.loc40_47, %I.facet.loc40_56 [concrete = constants.%I.facet.0a4]
  359. // CHECK:STDOUT: %as_type.loc40_62: type = facet_access_type %.loc40_56 [concrete = constants.%C]
  360. // CHECK:STDOUT: %.loc40_62: type = converted %.loc40_56, %as_type.loc40_62 [concrete = constants.%C]
  361. // CHECK:STDOUT: %J.ref.loc40_74: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  362. // CHECK:STDOUT: %J.facet.loc40_71: %J.type = facet_value %.loc40_62, (constants.%J.impl_witness) [concrete = constants.%J.facet.5ad]
  363. // CHECK:STDOUT: %.loc40_71: %J.type = converted %.loc40_62, %J.facet.loc40_71 [concrete = constants.%J.facet.5ad]
  364. // CHECK:STDOUT: %as_type.loc40_75: type = facet_access_type %.loc40_71 [concrete = constants.%C]
  365. // CHECK:STDOUT: %.loc40_75: type = converted %.loc40_71, %as_type.loc40_75 [concrete = constants.%C]
  366. // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c]
  367. // CHECK:STDOUT: %impl.elem0: %.be8 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%C.as.J.impl.JJ]
  368. // CHECK:STDOUT: %bound_method.loc40_77: <bound method> = bound_method %.loc40_8.1, %impl.elem0
  369. // CHECK:STDOUT: %.loc40_8.2: %C = bind_value %.loc40_8.1
  370. // CHECK:STDOUT: %C.as.J.impl.JJ.call: init %empty_tuple.type = call %bound_method.loc40_77(%.loc40_8.2)
  371. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  372. // CHECK:STDOUT: %C.ref.loc46_5: type = name_ref C, %C.decl [concrete = constants.%C]
  373. // CHECK:STDOUT: %.loc46_9.1: %empty_struct_type = struct_literal ()
  374. // CHECK:STDOUT: %C.ref.loc46_14: type = name_ref C, %C.decl [concrete = constants.%C]
  375. // CHECK:STDOUT: %.loc46_9.2: ref %C = temporary_storage
  376. // CHECK:STDOUT: %.loc46_9.3: init %C = class_init (), %.loc46_9.2 [concrete = constants.%C.val]
  377. // CHECK:STDOUT: %.loc46_9.4: ref %C = temporary %.loc46_9.2, %.loc46_9.3
  378. // CHECK:STDOUT: %.loc46_11.1: ref %C = converted %.loc46_9.1, %.loc46_9.4
  379. // CHECK:STDOUT: %facet_value.loc46_15.1: %facet_type = facet_value %C.ref.loc46_5, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value.d36]
  380. // CHECK:STDOUT: %.loc46_15.1: %facet_type = converted %C.ref.loc46_5, %facet_value.loc46_15.1 [concrete = constants.%facet_value.d36]
  381. // CHECK:STDOUT: %facet_value.loc46_15.2: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value.d36]
  382. // CHECK:STDOUT: %.loc46_15.2: %facet_type = converted constants.%C, %facet_value.loc46_15.2 [concrete = constants.%facet_value.d36]
  383. // CHECK:STDOUT: %facet_value.loc46_15.3: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value.d36]
  384. // CHECK:STDOUT: %.loc46_15.3: %facet_type = converted constants.%C, %facet_value.loc46_15.3 [concrete = constants.%facet_value.d36]
  385. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.ref, @F(constants.%facet_value.d36) [concrete = constants.%F.specific_fn]
  386. // CHECK:STDOUT: %.loc46_11.2: %C = bind_value %.loc46_11.1
  387. // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc46_11.2)
  388. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc46: <bound method> = bound_method %.loc46_9.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.fbd
  389. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.fbd, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.c6b) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  390. // CHECK:STDOUT: %bound_method.loc46: <bound method> = bound_method %.loc46_9.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1
  391. // CHECK:STDOUT: %addr.loc46: %ptr.8e6 = addr_of %.loc46_9.4
  392. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc46: init %empty_tuple.type = call %bound_method.loc46(%addr.loc46)
  393. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound.loc40: <bound method> = bound_method %.loc40_6.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.fbd
  394. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2: <specific function> = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.fbd, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.c6b) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn]
  395. // CHECK:STDOUT: %bound_method.loc40_6: <bound method> = bound_method %.loc40_6.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.2
  396. // CHECK:STDOUT: %addr.loc40: %ptr.8e6 = addr_of %.loc40_6.4
  397. // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc40: init %empty_tuple.type = call %bound_method.loc40_6(%addr.loc40)
  398. // CHECK:STDOUT: return
  399. // CHECK:STDOUT: }
  400. // CHECK:STDOUT:
  401. // CHECK:STDOUT: fn @C.as.I.impl.II(%self.param: %C) {
  402. // CHECK:STDOUT: !entry:
  403. // CHECK:STDOUT: return
  404. // CHECK:STDOUT: }
  405. // CHECK:STDOUT:
  406. // CHECK:STDOUT: fn @C.as.J.impl.JJ(%self.param: %C) {
  407. // CHECK:STDOUT: !entry:
  408. // CHECK:STDOUT: return
  409. // CHECK:STDOUT: }
  410. // CHECK:STDOUT:
  411. // CHECK:STDOUT: specific @I.II(constants.%Self.7ee) {
  412. // CHECK:STDOUT: %Self => constants.%Self.7ee
  413. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.1b7
  414. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3f7
  415. // CHECK:STDOUT: }
  416. // CHECK:STDOUT:
  417. // CHECK:STDOUT: specific @J.JJ(constants.%Self.bf6) {
  418. // CHECK:STDOUT: %Self => constants.%Self.bf6
  419. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.09d
  420. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a23
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: specific @F(constants.%T) {
  424. // CHECK:STDOUT: %T.loc22_6.1 => constants.%T
  425. // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type
  426. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.038
  427. // CHECK:STDOUT: }
  428. // CHECK:STDOUT:
  429. // CHECK:STDOUT: specific @J.JJ(constants.%J.facet.861) {
  430. // CHECK:STDOUT: %Self => constants.%J.facet.861
  431. // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type
  432. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.038
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: specific @I.II(constants.%I.facet.0a4) {
  436. // CHECK:STDOUT: %Self => constants.%I.facet.0a4
  437. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  438. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
  439. // CHECK:STDOUT: }
  440. // CHECK:STDOUT:
  441. // CHECK:STDOUT: specific @J.JJ(constants.%J.facet.5ad) {
  442. // CHECK:STDOUT: %Self => constants.%J.facet.5ad
  443. // CHECK:STDOUT: %Self.binding.as_type => constants.%C
  444. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
  445. // CHECK:STDOUT: }
  446. // CHECK:STDOUT:
  447. // CHECK:STDOUT: specific @F(constants.%facet_value.d36) {
  448. // CHECK:STDOUT: %T.loc22_6.1 => constants.%facet_value.d36
  449. // CHECK:STDOUT: %T.binding.as_type => constants.%C
  450. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
  451. // CHECK:STDOUT:
  452. // CHECK:STDOUT: !definition:
  453. // CHECK:STDOUT: %require_complete => constants.%complete_type.357
  454. // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness
  455. // CHECK:STDOUT: %I.facet.loc26_18.2 => constants.%I.facet.0a4
  456. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  457. // CHECK:STDOUT: %J.facet.loc26_33.2 => constants.%J.facet.5ad
  458. // CHECK:STDOUT: %.loc26_69 => constants.%.be8
  459. // CHECK:STDOUT: %impl.elem0.loc26_69.2 => constants.%C.as.J.impl.JJ
  460. // CHECK:STDOUT: %specific_impl_fn.loc26_69.2 => constants.%C.as.J.impl.JJ
  461. // CHECK:STDOUT: }
  462. // CHECK:STDOUT: