canonical_query_self.carbon 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  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.as_type.a67: type = facet_access_type %Self.7ee [symbolic]
  50. // CHECK:STDOUT: %pattern_type.d22: type = pattern_type %Self.as_type.a67 [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.as_type.4e7: type = facet_access_type %Self.bf6 [symbolic]
  59. // CHECK:STDOUT: %pattern_type.8ba: type = pattern_type %Self.as_type.4e7 [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.as_type: type = facet_access_type %T [symbolic]
  80. // CHECK:STDOUT: %pattern_type.94b: type = pattern_type %T.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.387: <witness> = require_complete_type %T.as_type [symbolic]
  84. // CHECK:STDOUT: %I.lookup_impl_witness: <witness> = lookup_impl_witness %T, @I [symbolic]
  85. // CHECK:STDOUT: %I.facet.6ef: %I.type = facet_value %T.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.10a: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness) [symbolic]
  88. // CHECK:STDOUT: %.4b9: type = fn_type_with_self_type %J.JJ.type, %J.facet.10a [symbolic]
  89. // CHECK:STDOUT: %impl.elem0.366: %.4b9 = impl_witness_access %J.lookup_impl_witness, element0 [symbolic]
  90. // CHECK:STDOUT: %specific_impl_fn.7b5: <specific function> = specific_impl_function %impl.elem0.366, @J.JJ(%J.facet.10a) [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: %Destroy.type: type = facet_type <@Destroy> [concrete]
  104. // CHECK:STDOUT: %pattern_type.f6d: type = pattern_type auto [concrete]
  105. // CHECK:STDOUT: %Destroy.impl_witness.97e: <witness> = impl_witness @C.%Destroy.impl_witness_table [concrete]
  106. // CHECK:STDOUT: %ptr.8e6: type = ptr_type %C [concrete]
  107. // CHECK:STDOUT: %pattern_type.663: type = pattern_type %ptr.8e6 [concrete]
  108. // CHECK:STDOUT: %C.as.Destroy.impl.Op.type: type = fn_type @C.as.Destroy.impl.Op [concrete]
  109. // CHECK:STDOUT: %C.as.Destroy.impl.Op: %C.as.Destroy.impl.Op.type = struct_value () [concrete]
  110. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  111. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  112. // CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
  113. // CHECK:STDOUT: %.be8: type = fn_type_with_self_type %J.JJ.type, %J.facet.5ad [concrete]
  114. // CHECK:STDOUT: %facet_value: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete]
  115. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F, @F(%facet_value) [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, loc25_42, 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.94b) = binding_pattern t [concrete]
  145. // CHECK:STDOUT: %t.param_patt: @F.%pattern_type (%pattern_type.94b) = 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.as_type.loc22_20.1 (%T.as_type) = value_param call_param0
  159. // CHECK:STDOUT: %.loc22_20.1: type = splice_block %.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.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_20.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  162. // CHECK:STDOUT: %.loc22_20.2: type = converted %T.ref.loc22, %T.as_type.loc22_20.2 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT: %t: @F.%T.as_type.loc22_20.1 (%T.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.d22) = binding_pattern self [concrete]
  173. // CHECK:STDOUT: %self.param_patt: @I.II.%pattern_type (%pattern_type.d22) = value_param_pattern %self.patt, call_param0 [concrete]
  174. // CHECK:STDOUT: } {
  175. // CHECK:STDOUT: %self.param: @I.II.%Self.as_type.loc16_15.1 (%Self.as_type.a67) = value_param call_param0
  176. // CHECK:STDOUT: %.loc16_15.1: type = splice_block %.loc16_15.2 [symbolic = %Self.as_type.loc16_15.1 (constants.%Self.as_type.a67)] {
  177. // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.7ee)]
  178. // CHECK:STDOUT: %Self.as_type.loc16_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_15.1 (constants.%Self.as_type.a67)]
  179. // CHECK:STDOUT: %.loc16_15.2: type = converted %Self.ref, %Self.as_type.loc16_15.2 [symbolic = %Self.as_type.loc16_15.1 (constants.%Self.as_type.a67)]
  180. // CHECK:STDOUT: }
  181. // CHECK:STDOUT: %self: @I.II.%Self.as_type.loc16_15.1 (%Self.as_type.a67) = 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.8ba) = binding_pattern self [concrete]
  197. // CHECK:STDOUT: %self.param_patt: @J.JJ.%pattern_type (%pattern_type.8ba) = value_param_pattern %self.patt, call_param0 [concrete]
  198. // CHECK:STDOUT: } {
  199. // CHECK:STDOUT: %self.param: @J.JJ.%Self.as_type.loc19_15.1 (%Self.as_type.4e7) = value_param call_param0
  200. // CHECK:STDOUT: %.loc19_15.1: type = splice_block %.loc19_15.2 [symbolic = %Self.as_type.loc19_15.1 (constants.%Self.as_type.4e7)] {
  201. // CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.bf6)]
  202. // CHECK:STDOUT: %Self.as_type.loc19_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc19_15.1 (constants.%Self.as_type.4e7)]
  203. // CHECK:STDOUT: %.loc19_15.2: type = converted %Self.ref, %Self.as_type.loc19_15.2 [symbolic = %Self.as_type.loc19_15.1 (constants.%Self.as_type.4e7)]
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT: %self: @J.JJ.%Self.as_type.loc19_15.1 (%Self.as_type.4e7) = 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: impl @C.as.Destroy.impl: @C.%Self.ref as constants.%Destroy.type {
  246. // CHECK:STDOUT: %C.as.Destroy.impl.Op.decl: %C.as.Destroy.impl.Op.type = fn_decl @C.as.Destroy.impl.Op [concrete = constants.%C.as.Destroy.impl.Op] {
  247. // CHECK:STDOUT: %self.patt: %pattern_type.663 = binding_pattern self [concrete]
  248. // CHECK:STDOUT: %self.param_patt: %pattern_type.663 = value_param_pattern %self.patt, call_param0 [concrete]
  249. // CHECK:STDOUT: %.loc30: %pattern_type.f6d = addr_pattern %self.param_patt [concrete]
  250. // CHECK:STDOUT: } {
  251. // CHECK:STDOUT: %self.param: %ptr.8e6 = value_param call_param0
  252. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  253. // CHECK:STDOUT: %self: %ptr.8e6 = bind_name self, %self.param
  254. // CHECK:STDOUT: }
  255. // CHECK:STDOUT:
  256. // CHECK:STDOUT: !members:
  257. // CHECK:STDOUT: .Op = %C.as.Destroy.impl.Op.decl
  258. // CHECK:STDOUT: witness = @C.%Destroy.impl_witness
  259. // CHECK:STDOUT: }
  260. // CHECK:STDOUT:
  261. // CHECK:STDOUT: class @C {
  262. // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} {
  263. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  264. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  265. // CHECK:STDOUT: }
  266. // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (@C.as.I.impl.%C.as.I.impl.II.decl), @C.as.I.impl [concrete]
  267. // CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
  268. // CHECK:STDOUT: impl_decl @C.as.J.impl [concrete] {} {
  269. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  270. // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (@C.as.J.impl.%C.as.J.impl.JJ.decl), @C.as.J.impl [concrete]
  273. // CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
  274. // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [concrete = constants.%C]
  275. // CHECK:STDOUT: impl_decl @C.as.Destroy.impl [concrete] {} {}
  276. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (@C.as.Destroy.impl.%C.as.Destroy.impl.Op.decl), @C.as.Destroy.impl [concrete]
  277. // CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness %Destroy.impl_witness_table [concrete = constants.%Destroy.impl_witness.97e]
  278. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  279. // CHECK:STDOUT: complete_type_witness = %complete_type
  280. // CHECK:STDOUT:
  281. // CHECK:STDOUT: !members:
  282. // CHECK:STDOUT: .Self = constants.%C
  283. // CHECK:STDOUT: .I = <poisoned>
  284. // CHECK:STDOUT: .J = <poisoned>
  285. // CHECK:STDOUT: .JJ = <poisoned>
  286. // CHECK:STDOUT: extend @C.as.I.impl.%I.ref
  287. // CHECK:STDOUT: extend @C.as.J.impl.%J.ref
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: generic fn @I.II(@I.%Self: %I.type) {
  291. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.7ee)]
  292. // CHECK:STDOUT: %Self.as_type.loc16_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_15.1 (constants.%Self.as_type.a67)]
  293. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_15.1 [symbolic = %pattern_type (constants.%pattern_type.d22)]
  294. // CHECK:STDOUT:
  295. // CHECK:STDOUT: fn(%self.param: @I.II.%Self.as_type.loc16_15.1 (%Self.as_type.a67));
  296. // CHECK:STDOUT: }
  297. // CHECK:STDOUT:
  298. // CHECK:STDOUT: generic fn @J.JJ(@J.%Self: %J.type) {
  299. // CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.bf6)]
  300. // CHECK:STDOUT: %Self.as_type.loc19_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc19_15.1 (constants.%Self.as_type.4e7)]
  301. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc19_15.1 [symbolic = %pattern_type (constants.%pattern_type.8ba)]
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: fn(%self.param: @J.JJ.%Self.as_type.loc19_15.1 (%Self.as_type.4e7));
  304. // CHECK:STDOUT: }
  305. // CHECK:STDOUT:
  306. // CHECK:STDOUT: generic fn @F(%T.loc22_6.2: %facet_type) {
  307. // CHECK:STDOUT: %T.loc22_6.1: %facet_type = bind_symbolic_name T, 0 [symbolic = %T.loc22_6.1 (constants.%T)]
  308. // CHECK:STDOUT: %T.as_type.loc22_20.1: type = facet_access_type %T.loc22_6.1 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  309. // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_20.1 [symbolic = %pattern_type (constants.%pattern_type.94b)]
  310. // CHECK:STDOUT:
  311. // CHECK:STDOUT: !definition:
  312. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T.as_type.loc22_20.1 [symbolic = %require_complete (constants.%require_complete.387)]
  313. // 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)]
  314. // CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.as_type.loc22_20.1, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)]
  315. // 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)]
  316. // CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.as_type.loc22_20.1, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.10a)]
  317. // CHECK:STDOUT: %.loc26_69.2: type = fn_type_with_self_type constants.%J.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69.2 (constants.%.4b9)]
  318. // CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69.2 (%.4b9) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0.366)]
  319. // 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.7b5)]
  320. // CHECK:STDOUT:
  321. // CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_20.1 (%T.as_type)) {
  322. // CHECK:STDOUT: !entry:
  323. // CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_20.1 (%T.as_type) = name_ref t, %t
  324. // CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_6.2 [symbolic = %T.loc22_6.1 (constants.%T)]
  325. // CHECK:STDOUT: %I.ref.loc26_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  326. // CHECK:STDOUT: %T.as_type.loc26_18: type = facet_access_type constants.%T [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  327. // CHECK:STDOUT: %I.facet.loc26_18.1: %I.type = facet_value %T.as_type.loc26_18, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)]
  328. // CHECK:STDOUT: %.loc26_18: %I.type = converted %T.ref.loc26, %I.facet.loc26_18.1 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)]
  329. // CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  330. // CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  331. // CHECK:STDOUT: %J.ref.loc26_36: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  332. // CHECK:STDOUT: %J.facet.loc26_33.1: %J.type = facet_value constants.%T.as_type, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.10a)]
  333. // CHECK:STDOUT: %.loc26_33: %J.type = converted %.loc26_24, %J.facet.loc26_33.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.10a)]
  334. // CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  335. // CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  336. // CHECK:STDOUT: %I.ref.loc26_51: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  337. // CHECK:STDOUT: %I.facet.loc26_48: %I.type = facet_value constants.%T.as_type, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)]
  338. // CHECK:STDOUT: %.loc26_48: %I.type = converted %.loc26_39, %I.facet.loc26_48 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.6ef)]
  339. // CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  340. // CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  341. // CHECK:STDOUT: %J.ref.loc26_66: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  342. // CHECK:STDOUT: %J.facet.loc26_63: %J.type = facet_value constants.%T.as_type, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.10a)]
  343. // CHECK:STDOUT: %.loc26_63: %J.type = converted %.loc26_54, %J.facet.loc26_63 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.10a)]
  344. // CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  345. // CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  346. // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c]
  347. // CHECK:STDOUT: %T.as_type.loc26_69: type = facet_access_type constants.%T [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  348. // CHECK:STDOUT: %.loc26_69.1: type = converted constants.%T, %T.as_type.loc26_69 [symbolic = %T.as_type.loc22_20.1 (constants.%T.as_type)]
  349. // CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69.2 (%.4b9) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0.366)]
  350. // CHECK:STDOUT: %bound_method.loc26_69: <bound method> = bound_method %t.ref, %impl.elem0.loc26_69.1
  351. // CHECK:STDOUT: %specific_impl_fn.loc26_69.1: <specific function> = specific_impl_function %impl.elem0.loc26_69.1, @J.JJ(constants.%J.facet.10a) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn.7b5)]
  352. // CHECK:STDOUT: %bound_method.loc26_73: <bound method> = bound_method %t.ref, %specific_impl_fn.loc26_69.1
  353. // CHECK:STDOUT: %.loc26_73: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref)
  354. // CHECK:STDOUT: return
  355. // CHECK:STDOUT: }
  356. // CHECK:STDOUT: }
  357. // CHECK:STDOUT:
  358. // CHECK:STDOUT: fn @G() {
  359. // CHECK:STDOUT: !entry:
  360. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  361. // CHECK:STDOUT: %.loc40_6.1: %empty_struct_type = struct_literal ()
  362. // CHECK:STDOUT: %C.ref.loc40_11: type = name_ref C, %C.decl [concrete = constants.%C]
  363. // CHECK:STDOUT: %.loc40_6.2: ref %C = temporary_storage
  364. // CHECK:STDOUT: %.loc40_6.3: init %C = class_init (), %.loc40_6.2 [concrete = constants.%C.val]
  365. // CHECK:STDOUT: %.loc40_6.4: ref %C = temporary %.loc40_6.2, %.loc40_6.3
  366. // CHECK:STDOUT: %.loc40_8.1: ref %C = converted %.loc40_6.1, %.loc40_6.4
  367. // CHECK:STDOUT: %C.ref.loc40_24: type = name_ref C, %C.decl [concrete = constants.%C]
  368. // CHECK:STDOUT: %I.ref.loc40_29: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  369. // CHECK:STDOUT: %I.facet.loc40_26: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.0a4]
  370. // CHECK:STDOUT: %.loc40_26: %I.type = converted %C.ref.loc40_24, %I.facet.loc40_26 [concrete = constants.%I.facet.0a4]
  371. // CHECK:STDOUT: %as_type.loc40_32: type = facet_access_type %.loc40_26 [concrete = constants.%C]
  372. // CHECK:STDOUT: %.loc40_32: type = converted %.loc40_26, %as_type.loc40_32 [concrete = constants.%C]
  373. // CHECK:STDOUT: %J.ref.loc40_44: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  374. // CHECK:STDOUT: %J.facet.loc40_41: %J.type = facet_value constants.%C, (constants.%J.impl_witness) [concrete = constants.%J.facet.5ad]
  375. // CHECK:STDOUT: %.loc40_41: %J.type = converted %.loc40_32, %J.facet.loc40_41 [concrete = constants.%J.facet.5ad]
  376. // CHECK:STDOUT: %as_type.loc40_47: type = facet_access_type %.loc40_41 [concrete = constants.%C]
  377. // CHECK:STDOUT: %.loc40_47: type = converted %.loc40_41, %as_type.loc40_47 [concrete = constants.%C]
  378. // CHECK:STDOUT: %I.ref.loc40_59: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
  379. // CHECK:STDOUT: %I.facet.loc40_56: %I.type = facet_value constants.%C, (constants.%I.impl_witness) [concrete = constants.%I.facet.0a4]
  380. // CHECK:STDOUT: %.loc40_56: %I.type = converted %.loc40_47, %I.facet.loc40_56 [concrete = constants.%I.facet.0a4]
  381. // CHECK:STDOUT: %as_type.loc40_62: type = facet_access_type %.loc40_56 [concrete = constants.%C]
  382. // CHECK:STDOUT: %.loc40_62: type = converted %.loc40_56, %as_type.loc40_62 [concrete = constants.%C]
  383. // CHECK:STDOUT: %J.ref.loc40_74: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
  384. // CHECK:STDOUT: %J.facet.loc40_71: %J.type = facet_value constants.%C, (constants.%J.impl_witness) [concrete = constants.%J.facet.5ad]
  385. // CHECK:STDOUT: %.loc40_71: %J.type = converted %.loc40_62, %J.facet.loc40_71 [concrete = constants.%J.facet.5ad]
  386. // CHECK:STDOUT: %as_type.loc40_75: type = facet_access_type %.loc40_71 [concrete = constants.%C]
  387. // CHECK:STDOUT: %.loc40_75: type = converted %.loc40_71, %as_type.loc40_75 [concrete = constants.%C]
  388. // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.78c]
  389. // CHECK:STDOUT: %impl.elem0: %.be8 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%C.as.J.impl.JJ]
  390. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc40_8.1, %impl.elem0
  391. // CHECK:STDOUT: %.loc40_8.2: %C = bind_value %.loc40_8.1
  392. // CHECK:STDOUT: %C.as.J.impl.JJ.call: init %empty_tuple.type = call %bound_method(%.loc40_8.2)
  393. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  394. // CHECK:STDOUT: %C.ref.loc46_5: type = name_ref C, %C.decl [concrete = constants.%C]
  395. // CHECK:STDOUT: %.loc46_9.1: %empty_struct_type = struct_literal ()
  396. // CHECK:STDOUT: %C.ref.loc46_14: type = name_ref C, %C.decl [concrete = constants.%C]
  397. // CHECK:STDOUT: %.loc46_9.2: ref %C = temporary_storage
  398. // CHECK:STDOUT: %.loc46_9.3: init %C = class_init (), %.loc46_9.2 [concrete = constants.%C.val]
  399. // CHECK:STDOUT: %.loc46_9.4: ref %C = temporary %.loc46_9.2, %.loc46_9.3
  400. // CHECK:STDOUT: %.loc46_11.1: ref %C = converted %.loc46_9.1, %.loc46_9.4
  401. // CHECK:STDOUT: %facet_value.loc46_15.1: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value]
  402. // CHECK:STDOUT: %.loc46_15.1: %facet_type = converted %C.ref.loc46_5, %facet_value.loc46_15.1 [concrete = constants.%facet_value]
  403. // 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]
  404. // CHECK:STDOUT: %.loc46_15.2: %facet_type = converted constants.%C, %facet_value.loc46_15.2 [concrete = constants.%facet_value]
  405. // 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]
  406. // CHECK:STDOUT: %.loc46_15.3: %facet_type = converted constants.%C, %facet_value.loc46_15.3 [concrete = constants.%facet_value]
  407. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.ref, @F(constants.%facet_value) [concrete = constants.%F.specific_fn]
  408. // CHECK:STDOUT: %.loc46_11.2: %C = bind_value %.loc46_11.1
  409. // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc46_11.2)
  410. // CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc46: <bound method> = bound_method %.loc46_9.4, constants.%C.as.Destroy.impl.Op
  411. // CHECK:STDOUT: %addr.loc46: %ptr.8e6 = addr_of %.loc46_9.4
  412. // CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc46: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc46(%addr.loc46)
  413. // CHECK:STDOUT: %C.as.Destroy.impl.Op.bound.loc40: <bound method> = bound_method %.loc40_6.4, constants.%C.as.Destroy.impl.Op
  414. // CHECK:STDOUT: %addr.loc40: %ptr.8e6 = addr_of %.loc40_6.4
  415. // CHECK:STDOUT: %C.as.Destroy.impl.Op.call.loc40: init %empty_tuple.type = call %C.as.Destroy.impl.Op.bound.loc40(%addr.loc40)
  416. // CHECK:STDOUT: return
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: fn @C.as.I.impl.II(%self.param: %C) {
  420. // CHECK:STDOUT: !entry:
  421. // CHECK:STDOUT: return
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT:
  424. // CHECK:STDOUT: fn @C.as.J.impl.JJ(%self.param: %C) {
  425. // CHECK:STDOUT: !entry:
  426. // CHECK:STDOUT: return
  427. // CHECK:STDOUT: }
  428. // CHECK:STDOUT:
  429. // CHECK:STDOUT: fn @C.as.Destroy.impl.Op(%self.param: %ptr.8e6) = "no_op";
  430. // CHECK:STDOUT:
  431. // CHECK:STDOUT: specific @I.II(constants.%Self.7ee) {
  432. // CHECK:STDOUT: %Self => constants.%Self.7ee
  433. // CHECK:STDOUT: %Self.as_type.loc16_15.1 => constants.%Self.as_type.a67
  434. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d22
  435. // CHECK:STDOUT: }
  436. // CHECK:STDOUT:
  437. // CHECK:STDOUT: specific @J.JJ(constants.%Self.bf6) {
  438. // CHECK:STDOUT: %Self => constants.%Self.bf6
  439. // CHECK:STDOUT: %Self.as_type.loc19_15.1 => constants.%Self.as_type.4e7
  440. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8ba
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: specific @F(constants.%T) {
  444. // CHECK:STDOUT: %T.loc22_6.1 => constants.%T
  445. // CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%T.as_type
  446. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.94b
  447. // CHECK:STDOUT: }
  448. // CHECK:STDOUT:
  449. // CHECK:STDOUT: specific @J.JJ(constants.%J.facet.10a) {
  450. // CHECK:STDOUT: %Self => constants.%J.facet.10a
  451. // CHECK:STDOUT: %Self.as_type.loc19_15.1 => constants.%T.as_type
  452. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.94b
  453. // CHECK:STDOUT: }
  454. // CHECK:STDOUT:
  455. // CHECK:STDOUT: specific @I.II(constants.%I.facet.0a4) {
  456. // CHECK:STDOUT: %Self => constants.%I.facet.0a4
  457. // CHECK:STDOUT: %Self.as_type.loc16_15.1 => constants.%C
  458. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
  459. // CHECK:STDOUT: }
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: specific @J.JJ(constants.%J.facet.5ad) {
  462. // CHECK:STDOUT: %Self => constants.%J.facet.5ad
  463. // CHECK:STDOUT: %Self.as_type.loc19_15.1 => constants.%C
  464. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
  465. // CHECK:STDOUT: }
  466. // CHECK:STDOUT:
  467. // CHECK:STDOUT: specific @F(constants.%facet_value) {
  468. // CHECK:STDOUT: %T.loc22_6.1 => constants.%facet_value
  469. // CHECK:STDOUT: %T.as_type.loc22_20.1 => constants.%C
  470. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893
  471. // CHECK:STDOUT:
  472. // CHECK:STDOUT: !definition:
  473. // CHECK:STDOUT: %require_complete => constants.%complete_type
  474. // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness
  475. // CHECK:STDOUT: %I.facet.loc26_18.2 => constants.%I.facet.0a4
  476. // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness
  477. // CHECK:STDOUT: %J.facet.loc26_33.2 => constants.%J.facet.5ad
  478. // CHECK:STDOUT: %.loc26_69.2 => constants.%.be8
  479. // CHECK:STDOUT: %impl.elem0.loc26_69.2 => constants.%C.as.J.impl.JJ
  480. // CHECK:STDOUT: %specific_impl_fn.loc26_69.2 => constants.%C.as.J.impl.JJ
  481. // CHECK:STDOUT: }
  482. // CHECK:STDOUT: