impl_forall.carbon 31 KB

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