impl_forall.carbon 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  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/impl/lookup/no_prelude/impl_forall.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon
  10. // --- impl_forall.carbon
  11. class A(T:! type) {
  12. var n: T;
  13. }
  14. interface I(U:! type) {
  15. fn F[self: Self]() -> U;
  16. }
  17. impl forall [V:! type] A(V) as I(V) {
  18. fn F[self: Self]() -> V {
  19. return self.n;
  20. }
  21. }
  22. fn TestGeneric[W:! type](a: A(W)) -> W {
  23. return a.(I(W).F)();
  24. }
  25. fn TestSpecific(a: A({})) -> {} {
  26. return a.(I({}).F)();
  27. }
  28. // CHECK:STDOUT: --- impl_forall.carbon
  29. // CHECK:STDOUT:
  30. // CHECK:STDOUT: constants {
  31. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  32. // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
  33. // CHECK:STDOUT: %A.type: type = generic_class_type @A [template]
  34. // CHECK:STDOUT: %A.generic: %A.type = struct_value () [template]
  35. // CHECK:STDOUT: %A.619: type = class_type @A, @A(%T) [symbolic]
  36. // CHECK:STDOUT: %require_complete.db1: <witness> = require_complete_type %T [symbolic]
  37. // CHECK:STDOUT: %A.elem.78a: type = unbound_element_type %A.619, %T [symbolic]
  38. // CHECK:STDOUT: %struct_type.n.0d6: type = struct_type {.n: %T} [symbolic]
  39. // CHECK:STDOUT: %complete_type.74d: <witness> = complete_type_witness %struct_type.n.0d6 [symbolic]
  40. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic]
  41. // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic]
  42. // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [template]
  43. // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [template]
  44. // CHECK:STDOUT: %I.type.995: type = facet_type <@I, @I(%U)> [symbolic]
  45. // CHECK:STDOUT: %Self: %I.type.995 = bind_symbolic_name Self, 1 [symbolic]
  46. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
  47. // CHECK:STDOUT: %F.type.1c6: type = fn_type @F.1, @I(%U) [symbolic]
  48. // CHECK:STDOUT: %F.7e2: %F.type.1c6 = struct_value () [symbolic]
  49. // CHECK:STDOUT: %F.assoc_type.0d1: type = assoc_entity_type %I.type.995, %F.type.1c6 [symbolic]
  50. // CHECK:STDOUT: %assoc0.1b8: %F.assoc_type.0d1 = assoc_entity element0, @I.%F.decl [symbolic]
  51. // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic]
  52. // CHECK:STDOUT: %V.patt: type = symbolic_binding_pattern V, 0 [symbolic]
  53. // CHECK:STDOUT: %A.53d: type = class_type @A, @A(%V) [symbolic]
  54. // CHECK:STDOUT: %I.type.1af: type = facet_type <@I, @I(%V)> [symbolic]
  55. // CHECK:STDOUT: %require_complete.f84: <witness> = require_complete_type %I.type.1af [symbolic]
  56. // CHECK:STDOUT: %F.type.a96: type = fn_type @F.1, @I(%V) [symbolic]
  57. // CHECK:STDOUT: %F.0a7: %F.type.a96 = struct_value () [symbolic]
  58. // CHECK:STDOUT: %F.assoc_type.07c: type = assoc_entity_type %I.type.1af, %F.type.a96 [symbolic]
  59. // CHECK:STDOUT: %assoc0.fa4: %F.assoc_type.07c = assoc_entity element0, @I.%F.decl [symbolic]
  60. // CHECK:STDOUT: %impl_witness.ed3: <witness> = impl_witness (@impl.%F.decl), @impl(%V) [symbolic]
  61. // CHECK:STDOUT: %F.type.bf7: type = fn_type @F.2, @impl(%V) [symbolic]
  62. // CHECK:STDOUT: %F.684: %F.type.bf7 = struct_value () [symbolic]
  63. // CHECK:STDOUT: %I.facet: %I.type.995 = facet_value %A.53d, %impl_witness.ed3 [symbolic]
  64. // CHECK:STDOUT: %require_complete.5da: <witness> = require_complete_type %V [symbolic]
  65. // CHECK:STDOUT: %A.elem.49b: type = unbound_element_type %A.53d, %V [symbolic]
  66. // CHECK:STDOUT: %struct_type.n.626: type = struct_type {.n: %V} [symbolic]
  67. // CHECK:STDOUT: %complete_type.a0c: <witness> = complete_type_witness %struct_type.n.626 [symbolic]
  68. // CHECK:STDOUT: %require_complete.51f: <witness> = require_complete_type %A.53d [symbolic]
  69. // CHECK:STDOUT: %W: type = bind_symbolic_name W, 0 [symbolic]
  70. // CHECK:STDOUT: %W.patt: type = symbolic_binding_pattern W, 0 [symbolic]
  71. // CHECK:STDOUT: %A.6bc: type = class_type @A, @A(%W) [symbolic]
  72. // CHECK:STDOUT: %TestGeneric.type: type = fn_type @TestGeneric [template]
  73. // CHECK:STDOUT: %TestGeneric: %TestGeneric.type = struct_value () [template]
  74. // CHECK:STDOUT: %require_complete.7dc: <witness> = require_complete_type %W [symbolic]
  75. // CHECK:STDOUT: %A.elem.6e4: type = unbound_element_type %A.6bc, %W [symbolic]
  76. // CHECK:STDOUT: %struct_type.n.784: type = struct_type {.n: %W} [symbolic]
  77. // CHECK:STDOUT: %complete_type.793: <witness> = complete_type_witness %struct_type.n.784 [symbolic]
  78. // CHECK:STDOUT: %require_complete.697: <witness> = require_complete_type %A.6bc [symbolic]
  79. // CHECK:STDOUT: %I.type.c20: type = facet_type <@I, @I(%W)> [symbolic]
  80. // CHECK:STDOUT: %require_complete.9c6: <witness> = require_complete_type %I.type.c20 [symbolic]
  81. // CHECK:STDOUT: %F.type.6be: type = fn_type @F.1, @I(%W) [symbolic]
  82. // CHECK:STDOUT: %F.c9b: %F.type.6be = struct_value () [symbolic]
  83. // CHECK:STDOUT: %F.assoc_type.79f: type = assoc_entity_type %I.type.c20, %F.type.6be [symbolic]
  84. // CHECK:STDOUT: %assoc0.2b5: %F.assoc_type.79f = assoc_entity element0, @I.%F.decl [symbolic]
  85. // CHECK:STDOUT: %impl_witness.1c5: <witness> = impl_witness (@impl.%F.decl), @impl(%W) [symbolic]
  86. // CHECK:STDOUT: %F.type.7b7: type = fn_type @F.2, @impl(%W) [symbolic]
  87. // CHECK:STDOUT: %F.038: %F.type.7b7 = struct_value () [symbolic]
  88. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
  89. // CHECK:STDOUT: %A.e6e: type = class_type @A, @A(%empty_struct_type) [template]
  90. // CHECK:STDOUT: %TestSpecific.type: type = fn_type @TestSpecific [template]
  91. // CHECK:STDOUT: %TestSpecific: %TestSpecific.type = struct_value () [template]
  92. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [template]
  93. // CHECK:STDOUT: %A.elem.949: type = unbound_element_type %A.e6e, %empty_struct_type [template]
  94. // CHECK:STDOUT: %struct_type.n.91c: type = struct_type {.n: %empty_struct_type} [template]
  95. // CHECK:STDOUT: %complete_type.0a6: <witness> = complete_type_witness %struct_type.n.91c [template]
  96. // CHECK:STDOUT: %I.type.263: type = facet_type <@I, @I(%empty_struct_type)> [template]
  97. // CHECK:STDOUT: %F.type.9ae: type = fn_type @F.1, @I(%empty_struct_type) [template]
  98. // CHECK:STDOUT: %F.ce1: %F.type.9ae = struct_value () [template]
  99. // CHECK:STDOUT: %F.assoc_type.693: type = assoc_entity_type %I.type.263, %F.type.9ae [template]
  100. // CHECK:STDOUT: %assoc0.aef: %F.assoc_type.693 = assoc_entity element0, @I.%F.decl [template]
  101. // CHECK:STDOUT: %complete_type.db7: <witness> = complete_type_witness %I.type.263 [template]
  102. // CHECK:STDOUT: %impl_witness.6cd: <witness> = impl_witness (@impl.%F.decl), @impl(%empty_struct_type) [template]
  103. // CHECK:STDOUT: %F.type.0df: type = fn_type @F.2, @impl(%empty_struct_type) [template]
  104. // CHECK:STDOUT: %F.01e: %F.type.0df = struct_value () [template]
  105. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template]
  106. // CHECK:STDOUT: }
  107. // CHECK:STDOUT:
  108. // CHECK:STDOUT: file {
  109. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  110. // CHECK:STDOUT: .A = %A.decl
  111. // CHECK:STDOUT: .I = %I.decl
  112. // CHECK:STDOUT: .TestGeneric = %TestGeneric.decl
  113. // CHECK:STDOUT: .TestSpecific = %TestSpecific.decl
  114. // CHECK:STDOUT: }
  115. // CHECK:STDOUT: %A.decl: %A.type = class_decl @A [template = constants.%A.generic] {
  116. // CHECK:STDOUT: %T.patt.loc2_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_9.2 (constants.%T.patt)]
  117. // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc2_9.1, runtime_param<invalid> [symbolic = %T.patt.loc2_9.2 (constants.%T.patt)]
  118. // CHECK:STDOUT: } {
  119. // CHECK:STDOUT: %T.param: type = value_param runtime_param<invalid>
  120. // CHECK:STDOUT: %T.loc2_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc2_9.2 (constants.%T)]
  121. // CHECK:STDOUT: }
  122. // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [template = constants.%I.generic] {
  123. // CHECK:STDOUT: %U.patt.loc6_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_13.2 (constants.%U.patt)]
  124. // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc6_13.1, runtime_param<invalid> [symbolic = %U.patt.loc6_13.2 (constants.%U.patt)]
  125. // CHECK:STDOUT: } {
  126. // CHECK:STDOUT: %U.param: type = value_param runtime_param<invalid>
  127. // CHECK:STDOUT: %U.loc6_13.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc6_13.2 (constants.%U)]
  128. // CHECK:STDOUT: }
  129. // CHECK:STDOUT: impl_decl @impl [template] {
  130. // CHECK:STDOUT: %V.patt.loc10_14.1: type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)]
  131. // CHECK:STDOUT: %V.param_patt: type = value_param_pattern %V.patt.loc10_14.1, runtime_param<invalid> [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)]
  132. // CHECK:STDOUT: } {
  133. // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic]
  134. // CHECK:STDOUT: %V.ref.loc10_26: type = name_ref V, %V.loc10_14.1 [symbolic = %V.loc10_14.2 (constants.%V)]
  135. // CHECK:STDOUT: %A.loc10_27.1: type = class_type @A, @A(constants.%V) [symbolic = %A.loc10_27.2 (constants.%A.53d)]
  136. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [template = constants.%I.generic]
  137. // CHECK:STDOUT: %V.ref.loc10_34: type = name_ref V, %V.loc10_14.1 [symbolic = %V.loc10_14.2 (constants.%V)]
  138. // CHECK:STDOUT: %I.type.loc10_35.1: type = facet_type <@I, @I(constants.%V)> [symbolic = %I.type.loc10_35.2 (constants.%I.type.1af)]
  139. // CHECK:STDOUT: %V.param: type = value_param runtime_param<invalid>
  140. // CHECK:STDOUT: %V.loc10_14.1: type = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc10_14.2 (constants.%V)]
  141. // CHECK:STDOUT: }
  142. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (@impl.%F.decl), @impl(constants.%V) [symbolic = @impl.%impl_witness (constants.%impl_witness.ed3)]
  143. // CHECK:STDOUT: %TestGeneric.decl: %TestGeneric.type = fn_decl @TestGeneric [template = constants.%TestGeneric] {
  144. // CHECK:STDOUT: %W.patt.loc16_16.1: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)]
  145. // CHECK:STDOUT: %W.param_patt: type = value_param_pattern %W.patt.loc16_16.1, runtime_param<invalid> [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)]
  146. // CHECK:STDOUT: %a.patt: @TestGeneric.%A.loc16_32.2 (%A.6bc) = binding_pattern a
  147. // CHECK:STDOUT: %a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.6bc) = value_param_pattern %a.patt, runtime_param0
  148. // CHECK:STDOUT: %return.patt: @TestGeneric.%W.loc16_16.2 (%W) = return_slot_pattern
  149. // CHECK:STDOUT: %return.param_patt: @TestGeneric.%W.loc16_16.2 (%W) = out_param_pattern %return.patt, runtime_param1
  150. // CHECK:STDOUT: } {
  151. // CHECK:STDOUT: %W.ref.loc16_38: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)]
  152. // CHECK:STDOUT: %W.param: type = value_param runtime_param<invalid>
  153. // CHECK:STDOUT: %W.loc16_16.1: type = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc16_16.2 (constants.%W)]
  154. // CHECK:STDOUT: %a.param: @TestGeneric.%A.loc16_32.2 (%A.6bc) = value_param runtime_param0
  155. // CHECK:STDOUT: %.loc16: type = splice_block %A.loc16_32.1 [symbolic = %A.loc16_32.2 (constants.%A.6bc)] {
  156. // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic]
  157. // CHECK:STDOUT: %W.ref.loc16_31: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)]
  158. // CHECK:STDOUT: %A.loc16_32.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_32.2 (constants.%A.6bc)]
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT: %a: @TestGeneric.%A.loc16_32.2 (%A.6bc) = bind_name a, %a.param
  161. // CHECK:STDOUT: %return.param: ref @TestGeneric.%W.loc16_16.2 (%W) = out_param runtime_param1
  162. // CHECK:STDOUT: %return: ref @TestGeneric.%W.loc16_16.2 (%W) = return_slot %return.param
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT: %TestSpecific.decl: %TestSpecific.type = fn_decl @TestSpecific [template = constants.%TestSpecific] {
  165. // CHECK:STDOUT: %a.patt: %A.e6e = binding_pattern a
  166. // CHECK:STDOUT: %a.param_patt: %A.e6e = value_param_pattern %a.patt, runtime_param0
  167. // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern
  168. // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1
  169. // CHECK:STDOUT: } {
  170. // CHECK:STDOUT: %.loc20_31.1: %empty_struct_type = struct_literal ()
  171. // CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
  172. // CHECK:STDOUT: %a.param: %A.e6e = value_param runtime_param0
  173. // CHECK:STDOUT: %.loc20_24.1: type = splice_block %A [template = constants.%A.e6e] {
  174. // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic]
  175. // CHECK:STDOUT: %.loc20_23: %empty_struct_type = struct_literal ()
  176. // CHECK:STDOUT: %.loc20_24.2: type = converted %.loc20_23, constants.%empty_struct_type [template = constants.%empty_struct_type]
  177. // CHECK:STDOUT: %A: type = class_type @A, @A(constants.%empty_struct_type) [template = constants.%A.e6e]
  178. // CHECK:STDOUT: }
  179. // CHECK:STDOUT: %a: %A.e6e = bind_name a, %a.param
  180. // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1
  181. // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT: }
  184. // CHECK:STDOUT:
  185. // CHECK:STDOUT: generic interface @I(%U.loc6_13.1: type) {
  186. // CHECK:STDOUT: %U.loc6_13.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc6_13.2 (constants.%U)]
  187. // CHECK:STDOUT: %U.patt.loc6_13.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_13.2 (constants.%U.patt)]
  188. // CHECK:STDOUT:
  189. // CHECK:STDOUT: !definition:
  190. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U.loc6_13.2)> [symbolic = %I.type (constants.%I.type.995)]
  191. // CHECK:STDOUT: %Self.2: %I.type.995 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
  192. // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%U.loc6_13.2) [symbolic = %F.type (constants.%F.type.1c6)]
  193. // CHECK:STDOUT: %F: @I.%F.type (%F.type.1c6) = struct_value () [symbolic = %F (constants.%F.7e2)]
  194. // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.995), @I.%F.type (%F.type.1c6) [symbolic = %F.assoc_type (constants.%F.assoc_type.0d1)]
  195. // CHECK:STDOUT: %assoc0.loc7_26.2: @I.%F.assoc_type (%F.assoc_type.0d1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_26.2 (constants.%assoc0.1b8)]
  196. // CHECK:STDOUT:
  197. // CHECK:STDOUT: interface {
  198. // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.995) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
  199. // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type.1c6) = fn_decl @F.1 [symbolic = @I.%F (constants.%F.7e2)] {
  200. // CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = binding_pattern self
  201. // CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0
  202. // CHECK:STDOUT: %return.patt: @F.1.%U (%U) = return_slot_pattern
  203. // CHECK:STDOUT: %return.param_patt: @F.1.%U (%U) = out_param_pattern %return.patt, runtime_param1
  204. // CHECK:STDOUT: } {
  205. // CHECK:STDOUT: %U.ref: type = name_ref U, @I.%U.loc6_13.1 [symbolic = %U (constants.%U)]
  206. // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = value_param runtime_param0
  207. // CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.3 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] {
  208. // CHECK:STDOUT: %.loc7_14.2: @F.1.%I.type (%I.type.995) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)]
  209. // CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.995) = name_ref Self, %.loc7_14.2 [symbolic = %Self (constants.%Self)]
  210. // CHECK:STDOUT: %Self.as_type.loc7_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)]
  211. // CHECK:STDOUT: %.loc7_14.3: type = converted %Self.ref, %Self.as_type.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)]
  212. // CHECK:STDOUT: }
  213. // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = bind_name self, %self.param
  214. // CHECK:STDOUT: %return.param: ref @F.1.%U (%U) = out_param runtime_param1
  215. // CHECK:STDOUT: %return: ref @F.1.%U (%U) = return_slot %return.param
  216. // CHECK:STDOUT: }
  217. // CHECK:STDOUT: %assoc0.loc7_26.1: @I.%F.assoc_type (%F.assoc_type.0d1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc7_26.2 (constants.%assoc0.1b8)]
  218. // CHECK:STDOUT:
  219. // CHECK:STDOUT: !members:
  220. // CHECK:STDOUT: .Self = %Self.1
  221. // CHECK:STDOUT: .F = %assoc0.loc7_26.1
  222. // CHECK:STDOUT: witness = (%F.decl)
  223. // CHECK:STDOUT: }
  224. // CHECK:STDOUT: }
  225. // CHECK:STDOUT:
  226. // CHECK:STDOUT: generic impl @impl(%V.loc10_14.1: type) {
  227. // CHECK:STDOUT: %V.loc10_14.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc10_14.2 (constants.%V)]
  228. // CHECK:STDOUT: %V.patt.loc10_14.2: type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)]
  229. // CHECK:STDOUT: %A.loc10_27.2: type = class_type @A, @A(%V.loc10_14.2) [symbolic = %A.loc10_27.2 (constants.%A.53d)]
  230. // CHECK:STDOUT: %I.type.loc10_35.2: type = facet_type <@I, @I(%V.loc10_14.2)> [symbolic = %I.type.loc10_35.2 (constants.%I.type.1af)]
  231. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @impl.%I.type.loc10_35.2 (%I.type.1af) [symbolic = %require_complete (constants.%require_complete.f84)]
  232. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (%F.decl), @impl(%V.loc10_14.2) [symbolic = %impl_witness (constants.%impl_witness.ed3)]
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: !definition:
  235. // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V.loc10_14.2) [symbolic = %F.type (constants.%F.type.bf7)]
  236. // CHECK:STDOUT: %F: @impl.%F.type (%F.type.bf7) = struct_value () [symbolic = %F (constants.%F.684)]
  237. // CHECK:STDOUT:
  238. // CHECK:STDOUT: impl: %A.loc10_27.1 as %I.type.loc10_35.1 {
  239. // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.bf7) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.684)] {
  240. // CHECK:STDOUT: %self.patt: @F.2.%A (%A.53d) = binding_pattern self
  241. // CHECK:STDOUT: %self.param_patt: @F.2.%A (%A.53d) = value_param_pattern %self.patt, runtime_param0
  242. // CHECK:STDOUT: %return.patt: @F.2.%V (%V) = return_slot_pattern
  243. // CHECK:STDOUT: %return.param_patt: @F.2.%V (%V) = out_param_pattern %return.patt, runtime_param1
  244. // CHECK:STDOUT: } {
  245. // CHECK:STDOUT: %V.ref: type = name_ref V, @impl.%V.loc10_14.1 [symbolic = %V (constants.%V)]
  246. // CHECK:STDOUT: %self.param: @F.2.%A (%A.53d) = value_param runtime_param0
  247. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%A.loc10_27.1 [symbolic = %A (constants.%A.53d)]
  248. // CHECK:STDOUT: %self: @F.2.%A (%A.53d) = bind_name self, %self.param
  249. // CHECK:STDOUT: %return.param: ref @F.2.%V (%V) = out_param runtime_param1
  250. // CHECK:STDOUT: %return: ref @F.2.%V (%V) = return_slot %return.param
  251. // CHECK:STDOUT: }
  252. // CHECK:STDOUT:
  253. // CHECK:STDOUT: !members:
  254. // CHECK:STDOUT: .F = %F.decl
  255. // CHECK:STDOUT: witness = file.%impl_witness
  256. // CHECK:STDOUT: }
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: generic class @A(%T.loc2_9.1: type) {
  260. // CHECK:STDOUT: %T.loc2_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc2_9.2 (constants.%T)]
  261. // CHECK:STDOUT: %T.patt.loc2_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc2_9.2 (constants.%T.patt)]
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: !definition:
  264. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @A.%T.loc2_9.2 (%T) [symbolic = %require_complete (constants.%require_complete.db1)]
  265. // CHECK:STDOUT: %A: type = class_type @A, @A(%T.loc2_9.2) [symbolic = %A (constants.%A.619)]
  266. // CHECK:STDOUT: %A.elem: type = unbound_element_type @A.%A (%A.619), @A.%T.loc2_9.2 (%T) [symbolic = %A.elem (constants.%A.elem.78a)]
  267. // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @A.%T.loc2_9.2 (%T)} [symbolic = %struct_type.n (constants.%struct_type.n.0d6)]
  268. // CHECK:STDOUT: %complete_type.loc4_1.2: <witness> = complete_type_witness @A.%struct_type.n (%struct_type.n.0d6) [symbolic = %complete_type.loc4_1.2 (constants.%complete_type.74d)]
  269. // CHECK:STDOUT:
  270. // CHECK:STDOUT: class {
  271. // CHECK:STDOUT: %.loc3: @A.%A.elem (%A.elem.78a) = field_decl n, element0 [template]
  272. // CHECK:STDOUT: %complete_type.loc4_1.1: <witness> = complete_type_witness %struct_type.n.0d6 [symbolic = %complete_type.loc4_1.2 (constants.%complete_type.74d)]
  273. // CHECK:STDOUT:
  274. // CHECK:STDOUT: !members:
  275. // CHECK:STDOUT: .Self = constants.%A.619
  276. // CHECK:STDOUT: .n = %.loc3
  277. // CHECK:STDOUT: complete_type_witness = %complete_type.loc4_1.1
  278. // CHECK:STDOUT: }
  279. // CHECK:STDOUT: }
  280. // CHECK:STDOUT:
  281. // CHECK:STDOUT: generic fn @F.1(@I.%U.loc6_13.1: type, @I.%Self.1: @I.%I.type (%I.type.995)) {
  282. // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)]
  283. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U)> [symbolic = %I.type (constants.%I.type.995)]
  284. // CHECK:STDOUT: %Self: %I.type.995 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
  285. // CHECK:STDOUT: %Self.as_type.loc7_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)]
  286. // CHECK:STDOUT:
  287. // CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type)]() -> @F.1.%U (%U);
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: generic fn @F.2(@impl.%V.loc10_14.1: type) {
  291. // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic = %V (constants.%V)]
  292. // CHECK:STDOUT: %A: type = class_type @A, @A(%V) [symbolic = %A (constants.%A.53d)]
  293. // CHECK:STDOUT:
  294. // CHECK:STDOUT: !definition:
  295. // CHECK:STDOUT: %require_complete.loc11_22: <witness> = require_complete_type @F.2.%V (%V) [symbolic = %require_complete.loc11_22 (constants.%require_complete.5da)]
  296. // CHECK:STDOUT: %require_complete.loc11_12: <witness> = require_complete_type @F.2.%A (%A.53d) [symbolic = %require_complete.loc11_12 (constants.%require_complete.51f)]
  297. // CHECK:STDOUT: %A.elem: type = unbound_element_type @F.2.%A (%A.53d), @F.2.%V (%V) [symbolic = %A.elem (constants.%A.elem.49b)]
  298. // CHECK:STDOUT:
  299. // CHECK:STDOUT: fn[%self.param_patt: @F.2.%A (%A.53d)]() -> @F.2.%V (%V) {
  300. // CHECK:STDOUT: !entry:
  301. // CHECK:STDOUT: %self.ref: @F.2.%A (%A.53d) = name_ref self, %self
  302. // CHECK:STDOUT: %n.ref: @F.2.%A.elem (%A.elem.49b) = name_ref n, @A.%.loc3 [template = @A.%.loc3]
  303. // CHECK:STDOUT: %.loc12_16.1: ref @F.2.%V (%V) = class_element_access %self.ref, element0
  304. // CHECK:STDOUT: %.loc12_16.2: @F.2.%V (%V) = bind_value %.loc12_16.1
  305. // CHECK:STDOUT: return %.loc12_16.2
  306. // CHECK:STDOUT: }
  307. // CHECK:STDOUT: }
  308. // CHECK:STDOUT:
  309. // CHECK:STDOUT: generic fn @TestGeneric(%W.loc16_16.1: type) {
  310. // CHECK:STDOUT: %W.loc16_16.2: type = bind_symbolic_name W, 0 [symbolic = %W.loc16_16.2 (constants.%W)]
  311. // CHECK:STDOUT: %W.patt.loc16_16.2: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)]
  312. // CHECK:STDOUT: %A.loc16_32.2: type = class_type @A, @A(%W.loc16_16.2) [symbolic = %A.loc16_32.2 (constants.%A.6bc)]
  313. // CHECK:STDOUT:
  314. // CHECK:STDOUT: !definition:
  315. // CHECK:STDOUT: %require_complete.loc16_35: <witness> = require_complete_type @TestGeneric.%W.loc16_16.2 (%W) [symbolic = %require_complete.loc16_35 (constants.%require_complete.7dc)]
  316. // CHECK:STDOUT: %require_complete.loc16_27: <witness> = require_complete_type @TestGeneric.%A.loc16_32.2 (%A.6bc) [symbolic = %require_complete.loc16_27 (constants.%require_complete.697)]
  317. // CHECK:STDOUT: %I.type.loc17_16.2: type = facet_type <@I, @I(%W.loc16_16.2)> [symbolic = %I.type.loc17_16.2 (constants.%I.type.c20)]
  318. // CHECK:STDOUT: %require_complete.loc17: <witness> = require_complete_type @TestGeneric.%I.type.loc17_16.2 (%I.type.c20) [symbolic = %require_complete.loc17 (constants.%require_complete.9c6)]
  319. // CHECK:STDOUT: %F.type.loc17_17: type = fn_type @F.1, @I(%W.loc16_16.2) [symbolic = %F.type.loc17_17 (constants.%F.type.6be)]
  320. // CHECK:STDOUT: %F.assoc_type: type = assoc_entity_type @TestGeneric.%I.type.loc17_16.2 (%I.type.c20), @TestGeneric.%F.type.loc17_17 (%F.type.6be) [symbolic = %F.assoc_type (constants.%F.assoc_type.79f)]
  321. // CHECK:STDOUT: %assoc0: @TestGeneric.%F.assoc_type (%F.assoc_type.79f) = assoc_entity element0, @I.%F.decl [symbolic = %assoc0 (constants.%assoc0.2b5)]
  322. // CHECK:STDOUT: %F.type.loc17_11: type = fn_type @F.2, @impl(%W.loc16_16.2) [symbolic = %F.type.loc17_11 (constants.%F.type.7b7)]
  323. // CHECK:STDOUT: %F: @TestGeneric.%F.type.loc17_11 (%F.type.7b7) = struct_value () [symbolic = %F (constants.%F.038)]
  324. // CHECK:STDOUT:
  325. // CHECK:STDOUT: fn[%W.param_patt: type](%a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.6bc)) -> @TestGeneric.%W.loc16_16.2 (%W) {
  326. // CHECK:STDOUT: !entry:
  327. // CHECK:STDOUT: %a.ref: @TestGeneric.%A.loc16_32.2 (%A.6bc) = name_ref a, %a
  328. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [template = constants.%I.generic]
  329. // CHECK:STDOUT: %W.ref.loc17: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)]
  330. // CHECK:STDOUT: %I.type.loc17_16.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc17_16.2 (constants.%I.type.c20)]
  331. // CHECK:STDOUT: %.loc17_17: @TestGeneric.%F.assoc_type (%F.assoc_type.79f) = specific_constant @I.%assoc0.loc7_26.1, @I(constants.%W) [symbolic = %assoc0 (constants.%assoc0.2b5)]
  332. // CHECK:STDOUT: %F.ref: @TestGeneric.%F.assoc_type (%F.assoc_type.79f) = name_ref F, %.loc17_17 [symbolic = %assoc0 (constants.%assoc0.2b5)]
  333. // CHECK:STDOUT: %impl.elem0: @TestGeneric.%F.type.loc17_17 (%F.type.6be) = impl_witness_access constants.%impl_witness.1c5, element0 [symbolic = %F (constants.%F.038)]
  334. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %a.ref, %impl.elem0
  335. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.bound, @F.2(constants.%W)
  336. // CHECK:STDOUT: %F.call: init @TestGeneric.%W.loc16_16.2 (%W) = call %F.specific_fn(%a.ref)
  337. // CHECK:STDOUT: %.loc17_22.1: @TestGeneric.%W.loc16_16.2 (%W) = value_of_initializer %F.call
  338. // CHECK:STDOUT: %.loc17_22.2: @TestGeneric.%W.loc16_16.2 (%W) = converted %F.call, %.loc17_22.1
  339. // CHECK:STDOUT: return %.loc17_22.2
  340. // CHECK:STDOUT: }
  341. // CHECK:STDOUT: }
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.e6e) -> %empty_struct_type {
  344. // CHECK:STDOUT: !entry:
  345. // CHECK:STDOUT: %a.ref: %A.e6e = name_ref a, %a
  346. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [template = constants.%I.generic]
  347. // CHECK:STDOUT: %.loc21_16: %empty_struct_type = struct_literal ()
  348. // CHECK:STDOUT: %.loc21_17: type = converted %.loc21_16, constants.%empty_struct_type [template = constants.%empty_struct_type]
  349. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type)> [template = constants.%I.type.263]
  350. // CHECK:STDOUT: %.loc21_18: %F.assoc_type.693 = specific_constant @I.%assoc0.loc7_26.1, @I(constants.%empty_struct_type) [template = constants.%assoc0.aef]
  351. // CHECK:STDOUT: %F.ref: %F.assoc_type.693 = name_ref F, %.loc21_18 [template = constants.%assoc0.aef]
  352. // CHECK:STDOUT: %impl.elem0: %F.type.9ae = impl_witness_access constants.%impl_witness.6cd, element0 [template = constants.%F.01e]
  353. // CHECK:STDOUT: %F.bound: <bound method> = bound_method %a.ref, %impl.elem0
  354. // CHECK:STDOUT: %F.specific_fn: <specific function> = specific_function %F.bound, @F.2(constants.%empty_struct_type)
  355. // CHECK:STDOUT: %F.call: init %empty_struct_type = call %F.specific_fn(%a.ref)
  356. // CHECK:STDOUT: %.loc21_22.1: ref %empty_struct_type = temporary_storage
  357. // CHECK:STDOUT: %.loc21_22.2: ref %empty_struct_type = temporary %.loc21_22.1, %F.call
  358. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct]
  359. // CHECK:STDOUT: %.loc21_23: %empty_struct_type = converted %F.call, %empty_struct [template = constants.%empty_struct]
  360. // CHECK:STDOUT: return %.loc21_23
  361. // CHECK:STDOUT: }
  362. // CHECK:STDOUT:
  363. // CHECK:STDOUT: specific @A(constants.%T) {
  364. // CHECK:STDOUT: %T.loc2_9.2 => constants.%T
  365. // CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%T
  366. // CHECK:STDOUT: }
  367. // CHECK:STDOUT:
  368. // CHECK:STDOUT: specific @A(%T.loc2_9.2) {}
  369. // CHECK:STDOUT:
  370. // CHECK:STDOUT: specific @I(constants.%U) {
  371. // CHECK:STDOUT: %U.loc6_13.2 => constants.%U
  372. // CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%U
  373. // CHECK:STDOUT: }
  374. // CHECK:STDOUT:
  375. // CHECK:STDOUT: specific @F.1(constants.%U, constants.%Self) {
  376. // CHECK:STDOUT: %U => constants.%U
  377. // CHECK:STDOUT: %I.type => constants.%I.type.995
  378. // CHECK:STDOUT: %Self => constants.%Self
  379. // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%Self.as_type
  380. // CHECK:STDOUT: }
  381. // CHECK:STDOUT:
  382. // CHECK:STDOUT: specific @I(@F.1.%U) {}
  383. // CHECK:STDOUT:
  384. // CHECK:STDOUT: specific @I(%U.loc6_13.2) {}
  385. // CHECK:STDOUT:
  386. // CHECK:STDOUT: specific @A(constants.%V) {
  387. // CHECK:STDOUT: %T.loc2_9.2 => constants.%V
  388. // CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%V
  389. // CHECK:STDOUT:
  390. // CHECK:STDOUT: !definition:
  391. // CHECK:STDOUT: %require_complete => constants.%require_complete.5da
  392. // CHECK:STDOUT: %A => constants.%A.53d
  393. // CHECK:STDOUT: %A.elem => constants.%A.elem.49b
  394. // CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.626
  395. // CHECK:STDOUT: %complete_type.loc4_1.2 => constants.%complete_type.a0c
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT:
  398. // CHECK:STDOUT: specific @I(constants.%V) {
  399. // CHECK:STDOUT: %U.loc6_13.2 => constants.%V
  400. // CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%V
  401. // CHECK:STDOUT:
  402. // CHECK:STDOUT: !definition:
  403. // CHECK:STDOUT: %I.type => constants.%I.type.1af
  404. // CHECK:STDOUT: %Self.2 => constants.%Self
  405. // CHECK:STDOUT: %F.type => constants.%F.type.a96
  406. // CHECK:STDOUT: %F => constants.%F.0a7
  407. // CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.07c
  408. // CHECK:STDOUT: %assoc0.loc7_26.2 => constants.%assoc0.fa4
  409. // CHECK:STDOUT: }
  410. // CHECK:STDOUT:
  411. // CHECK:STDOUT: specific @impl(constants.%V) {
  412. // CHECK:STDOUT: %V.loc10_14.2 => constants.%V
  413. // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%V
  414. // CHECK:STDOUT: %A.loc10_27.2 => constants.%A.53d
  415. // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.1af
  416. // CHECK:STDOUT: %require_complete => constants.%require_complete.f84
  417. // CHECK:STDOUT: %impl_witness => constants.%impl_witness.ed3
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: !definition:
  420. // CHECK:STDOUT: %F.type => constants.%F.type.bf7
  421. // CHECK:STDOUT: %F => constants.%F.684
  422. // CHECK:STDOUT: }
  423. // CHECK:STDOUT:
  424. // CHECK:STDOUT: specific @A(@impl.%V.loc10_14.2) {}
  425. // CHECK:STDOUT:
  426. // CHECK:STDOUT: specific @I(@impl.%V.loc10_14.2) {}
  427. // CHECK:STDOUT:
  428. // CHECK:STDOUT: specific @impl(%V.loc10_14.2) {}
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: specific @F.2(constants.%V) {
  431. // CHECK:STDOUT: %V => constants.%V
  432. // CHECK:STDOUT: %A => constants.%A.53d
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: specific @A(@F.2.%V) {}
  436. // CHECK:STDOUT:
  437. // CHECK:STDOUT: specific @F.1(constants.%V, constants.%I.facet) {
  438. // CHECK:STDOUT: %U => constants.%V
  439. // CHECK:STDOUT: %I.type => constants.%I.type.1af
  440. // CHECK:STDOUT: %Self => constants.%I.facet
  441. // CHECK:STDOUT: %Self.as_type.loc7_14.1 => constants.%A.53d
  442. // CHECK:STDOUT: }
  443. // CHECK:STDOUT:
  444. // CHECK:STDOUT: specific @A(constants.%W) {
  445. // CHECK:STDOUT: %T.loc2_9.2 => constants.%W
  446. // CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%W
  447. // CHECK:STDOUT:
  448. // CHECK:STDOUT: !definition:
  449. // CHECK:STDOUT: %require_complete => constants.%require_complete.7dc
  450. // CHECK:STDOUT: %A => constants.%A.6bc
  451. // CHECK:STDOUT: %A.elem => constants.%A.elem.6e4
  452. // CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.784
  453. // CHECK:STDOUT: %complete_type.loc4_1.2 => constants.%complete_type.793
  454. // CHECK:STDOUT: }
  455. // CHECK:STDOUT:
  456. // CHECK:STDOUT: specific @TestGeneric(constants.%W) {
  457. // CHECK:STDOUT: %W.loc16_16.2 => constants.%W
  458. // CHECK:STDOUT: %W.patt.loc16_16.2 => constants.%W
  459. // CHECK:STDOUT: %A.loc16_32.2 => constants.%A.6bc
  460. // CHECK:STDOUT: }
  461. // CHECK:STDOUT:
  462. // CHECK:STDOUT: specific @A(@TestGeneric.%W.loc16_16.2) {}
  463. // CHECK:STDOUT:
  464. // CHECK:STDOUT: specific @I(constants.%W) {
  465. // CHECK:STDOUT: %U.loc6_13.2 => constants.%W
  466. // CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%W
  467. // CHECK:STDOUT:
  468. // CHECK:STDOUT: !definition:
  469. // CHECK:STDOUT: %I.type => constants.%I.type.c20
  470. // CHECK:STDOUT: %Self.2 => constants.%Self
  471. // CHECK:STDOUT: %F.type => constants.%F.type.6be
  472. // CHECK:STDOUT: %F => constants.%F.c9b
  473. // CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.79f
  474. // CHECK:STDOUT: %assoc0.loc7_26.2 => constants.%assoc0.2b5
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT:
  477. // CHECK:STDOUT: specific @impl(constants.%W) {
  478. // CHECK:STDOUT: %V.loc10_14.2 => constants.%W
  479. // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%W
  480. // CHECK:STDOUT: %A.loc10_27.2 => constants.%A.6bc
  481. // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.c20
  482. // CHECK:STDOUT: %require_complete => constants.%require_complete.9c6
  483. // CHECK:STDOUT: %impl_witness => constants.%impl_witness.1c5
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: !definition:
  486. // CHECK:STDOUT: %F.type => constants.%F.type.7b7
  487. // CHECK:STDOUT: %F => constants.%F.038
  488. // CHECK:STDOUT: }
  489. // CHECK:STDOUT:
  490. // CHECK:STDOUT: specific @F.2(constants.%W) {
  491. // CHECK:STDOUT: %V => constants.%W
  492. // CHECK:STDOUT: %A => constants.%A.6bc
  493. // CHECK:STDOUT:
  494. // CHECK:STDOUT: !definition:
  495. // CHECK:STDOUT: %require_complete.loc11_22 => constants.%require_complete.7dc
  496. // CHECK:STDOUT: %require_complete.loc11_12 => constants.%require_complete.697
  497. // CHECK:STDOUT: %A.elem => constants.%A.elem.6e4
  498. // CHECK:STDOUT: }
  499. // CHECK:STDOUT:
  500. // CHECK:STDOUT: specific @I(@TestGeneric.%W.loc16_16.2) {}
  501. // CHECK:STDOUT:
  502. // CHECK:STDOUT: specific @impl(@TestGeneric.%W.loc16_16.2) {}
  503. // CHECK:STDOUT:
  504. // CHECK:STDOUT: specific @A(constants.%empty_struct_type) {
  505. // CHECK:STDOUT: %T.loc2_9.2 => constants.%empty_struct_type
  506. // CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%empty_struct_type
  507. // CHECK:STDOUT:
  508. // CHECK:STDOUT: !definition:
  509. // CHECK:STDOUT: %require_complete => constants.%complete_type.357
  510. // CHECK:STDOUT: %A => constants.%A.e6e
  511. // CHECK:STDOUT: %A.elem => constants.%A.elem.949
  512. // CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.91c
  513. // CHECK:STDOUT: %complete_type.loc4_1.2 => constants.%complete_type.0a6
  514. // CHECK:STDOUT: }
  515. // CHECK:STDOUT:
  516. // CHECK:STDOUT: specific @I(constants.%empty_struct_type) {
  517. // CHECK:STDOUT: %U.loc6_13.2 => constants.%empty_struct_type
  518. // CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%empty_struct_type
  519. // CHECK:STDOUT:
  520. // CHECK:STDOUT: !definition:
  521. // CHECK:STDOUT: %I.type => constants.%I.type.263
  522. // CHECK:STDOUT: %Self.2 => constants.%Self
  523. // CHECK:STDOUT: %F.type => constants.%F.type.9ae
  524. // CHECK:STDOUT: %F => constants.%F.ce1
  525. // CHECK:STDOUT: %F.assoc_type => constants.%F.assoc_type.693
  526. // CHECK:STDOUT: %assoc0.loc7_26.2 => constants.%assoc0.aef
  527. // CHECK:STDOUT: }
  528. // CHECK:STDOUT:
  529. // CHECK:STDOUT: specific @impl(constants.%empty_struct_type) {
  530. // CHECK:STDOUT: %V.loc10_14.2 => constants.%empty_struct_type
  531. // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%empty_struct_type
  532. // CHECK:STDOUT: %A.loc10_27.2 => constants.%A.e6e
  533. // CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.263
  534. // CHECK:STDOUT: %require_complete => constants.%complete_type.db7
  535. // CHECK:STDOUT: %impl_witness => constants.%impl_witness.6cd
  536. // CHECK:STDOUT:
  537. // CHECK:STDOUT: !definition:
  538. // CHECK:STDOUT: %F.type => constants.%F.type.0df
  539. // CHECK:STDOUT: %F => constants.%F.01e
  540. // CHECK:STDOUT: }
  541. // CHECK:STDOUT:
  542. // CHECK:STDOUT: specific @F.2(constants.%empty_struct_type) {
  543. // CHECK:STDOUT: %V => constants.%empty_struct_type
  544. // CHECK:STDOUT: %A => constants.%A.e6e
  545. // CHECK:STDOUT:
  546. // CHECK:STDOUT: !definition:
  547. // CHECK:STDOUT: %require_complete.loc11_22 => constants.%complete_type.357
  548. // CHECK:STDOUT: %require_complete.loc11_12 => constants.%complete_type.0a6
  549. // CHECK:STDOUT: %A.elem => constants.%A.elem.949
  550. // CHECK:STDOUT: }
  551. // CHECK:STDOUT: