self_in_signature.carbon 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  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/none.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/self_in_signature.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/self_in_signature.carbon
  14. interface UseSelf {
  15. fn F[self: Self](x: Self) -> Self;
  16. }
  17. class C {}
  18. class D {}
  19. impl C as UseSelf {
  20. fn F[unused self: C](unused x: C) -> C { return {}; }
  21. }
  22. impl D as UseSelf {
  23. fn F[unused self: Self](unused x: Self) -> Self { return {}; }
  24. }
  25. interface SelfNested {
  26. fn F(x: (Self*, {.x: Self, .y: ()}));
  27. }
  28. impl C as SelfNested {
  29. fn F(x: (C*, {.x: C, .y: ()}));
  30. }
  31. impl D as SelfNested {
  32. fn F(x: (Self*, {.x: Self, .y: ()}));
  33. }
  34. // CHECK:STDOUT: --- self_in_signature.carbon
  35. // CHECK:STDOUT:
  36. // CHECK:STDOUT: constants {
  37. // CHECK:STDOUT: %UseSelf.type: type = facet_type <@UseSelf> [concrete]
  38. // CHECK:STDOUT: %Self.f7b: %UseSelf.type = symbolic_binding Self, 0 [symbolic]
  39. // CHECK:STDOUT: %Self.as_type.563: type = facet_access_type %Self.f7b [symbolic]
  40. // CHECK:STDOUT: %pattern_type.a02: type = pattern_type %Self.as_type.563 [symbolic]
  41. // CHECK:STDOUT: %.4e5: Core.Form = init_form %Self.as_type.563 [symbolic]
  42. // CHECK:STDOUT: %UseSelf.WithSelf.F.type.ad8: type = fn_type @UseSelf.WithSelf.F, @UseSelf.WithSelf(%Self.f7b) [symbolic]
  43. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  44. // CHECK:STDOUT: %UseSelf.WithSelf.F.de0: %UseSelf.WithSelf.F.type.ad8 = struct_value () [symbolic]
  45. // CHECK:STDOUT: %UseSelf.assoc_type: type = assoc_entity_type @UseSelf [concrete]
  46. // CHECK:STDOUT: %assoc0.44b: %UseSelf.assoc_type = assoc_entity element0, @UseSelf.WithSelf.%UseSelf.WithSelf.F.decl [concrete]
  47. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  48. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
  49. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
  50. // CHECK:STDOUT: %D: type = class_type @D [concrete]
  51. // CHECK:STDOUT: %UseSelf.impl_witness.3c4: <witness> = impl_witness @C.as.UseSelf.impl.%UseSelf.impl_witness_table [concrete]
  52. // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete]
  53. // CHECK:STDOUT: %.a69: Core.Form = init_form %C [concrete]
  54. // CHECK:STDOUT: %C.as.UseSelf.impl.F.type: type = fn_type @C.as.UseSelf.impl.F [concrete]
  55. // CHECK:STDOUT: %C.as.UseSelf.impl.F: %C.as.UseSelf.impl.F.type = struct_value () [concrete]
  56. // CHECK:STDOUT: %UseSelf.facet.d4d: %UseSelf.type = facet_value %C, (%UseSelf.impl_witness.3c4) [concrete]
  57. // CHECK:STDOUT: %UseSelf.WithSelf.F.type.a7f: type = fn_type @UseSelf.WithSelf.F, @UseSelf.WithSelf(%UseSelf.facet.d4d) [concrete]
  58. // CHECK:STDOUT: %UseSelf.WithSelf.F.67c: %UseSelf.WithSelf.F.type.a7f = struct_value () [concrete]
  59. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
  60. // CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
  61. // CHECK:STDOUT: %UseSelf.impl_witness.22d: <witness> = impl_witness @D.as.UseSelf.impl.%UseSelf.impl_witness_table [concrete]
  62. // CHECK:STDOUT: %pattern_type.9c8: type = pattern_type %D [concrete]
  63. // CHECK:STDOUT: %.9a5: Core.Form = init_form %D [concrete]
  64. // CHECK:STDOUT: %D.as.UseSelf.impl.F.type: type = fn_type @D.as.UseSelf.impl.F [concrete]
  65. // CHECK:STDOUT: %D.as.UseSelf.impl.F: %D.as.UseSelf.impl.F.type = struct_value () [concrete]
  66. // CHECK:STDOUT: %UseSelf.facet.6f8: %UseSelf.type = facet_value %D, (%UseSelf.impl_witness.22d) [concrete]
  67. // CHECK:STDOUT: %UseSelf.WithSelf.F.type.37f: type = fn_type @UseSelf.WithSelf.F, @UseSelf.WithSelf(%UseSelf.facet.6f8) [concrete]
  68. // CHECK:STDOUT: %UseSelf.WithSelf.F.633: %UseSelf.WithSelf.F.type.37f = struct_value () [concrete]
  69. // CHECK:STDOUT: %D.val: %D = struct_value () [concrete]
  70. // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete]
  71. // CHECK:STDOUT: %Self.aed: %SelfNested.type = symbolic_binding Self, 0 [symbolic]
  72. // CHECK:STDOUT: %Self.as_type.b90: type = facet_access_type %Self.aed [symbolic]
  73. // CHECK:STDOUT: %ptr.ad7: type = ptr_type %Self.as_type.b90 [symbolic]
  74. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  75. // CHECK:STDOUT: %struct_type.x.y.1c0: type = struct_type {.x: %Self.as_type.b90, .y: %empty_tuple.type} [symbolic]
  76. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  77. // CHECK:STDOUT: %tuple.3de: %tuple.type.24b = tuple_value (%ptr.ad7, %struct_type.x.y.1c0) [symbolic]
  78. // CHECK:STDOUT: %tuple.type.e6d: type = tuple_type (%ptr.ad7, %struct_type.x.y.1c0) [symbolic]
  79. // CHECK:STDOUT: %pattern_type.4b0: type = pattern_type %tuple.type.e6d [symbolic]
  80. // CHECK:STDOUT: %SelfNested.WithSelf.F.type.430: type = fn_type @SelfNested.WithSelf.F, @SelfNested.WithSelf(%Self.aed) [symbolic]
  81. // CHECK:STDOUT: %SelfNested.WithSelf.F.257: %SelfNested.WithSelf.F.type.430 = struct_value () [symbolic]
  82. // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete]
  83. // CHECK:STDOUT: %assoc0.da4: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.WithSelf.%SelfNested.WithSelf.F.decl [concrete]
  84. // CHECK:STDOUT: %SelfNested.impl_witness.a03: <witness> = impl_witness @C.as.SelfNested.impl.%SelfNested.impl_witness_table [concrete]
  85. // CHECK:STDOUT: %ptr.31e: type = ptr_type %C [concrete]
  86. // CHECK:STDOUT: %struct_type.x.y.710: type = struct_type {.x: %C, .y: %empty_tuple.type} [concrete]
  87. // CHECK:STDOUT: %tuple.509: %tuple.type.24b = tuple_value (%ptr.31e, %struct_type.x.y.710) [concrete]
  88. // CHECK:STDOUT: %tuple.type.2f1: type = tuple_type (%ptr.31e, %struct_type.x.y.710) [concrete]
  89. // CHECK:STDOUT: %pattern_type.137: type = pattern_type %tuple.type.2f1 [concrete]
  90. // CHECK:STDOUT: %C.as.SelfNested.impl.F.type: type = fn_type @C.as.SelfNested.impl.F [concrete]
  91. // CHECK:STDOUT: %C.as.SelfNested.impl.F: %C.as.SelfNested.impl.F.type = struct_value () [concrete]
  92. // CHECK:STDOUT: %SelfNested.facet.f22: %SelfNested.type = facet_value %C, (%SelfNested.impl_witness.a03) [concrete]
  93. // CHECK:STDOUT: %SelfNested.WithSelf.F.type.f28: type = fn_type @SelfNested.WithSelf.F, @SelfNested.WithSelf(%SelfNested.facet.f22) [concrete]
  94. // CHECK:STDOUT: %SelfNested.WithSelf.F.45f: %SelfNested.WithSelf.F.type.f28 = struct_value () [concrete]
  95. // CHECK:STDOUT: %SelfNested.impl_witness.130: <witness> = impl_witness @D.as.SelfNested.impl.%SelfNested.impl_witness_table [concrete]
  96. // CHECK:STDOUT: %ptr.805: type = ptr_type %D [concrete]
  97. // CHECK:STDOUT: %struct_type.x.y.3e1: type = struct_type {.x: %D, .y: %empty_tuple.type} [concrete]
  98. // CHECK:STDOUT: %tuple.21a: %tuple.type.24b = tuple_value (%ptr.805, %struct_type.x.y.3e1) [concrete]
  99. // CHECK:STDOUT: %tuple.type.e0d: type = tuple_type (%ptr.805, %struct_type.x.y.3e1) [concrete]
  100. // CHECK:STDOUT: %pattern_type.d05: type = pattern_type %tuple.type.e0d [concrete]
  101. // CHECK:STDOUT: %D.as.SelfNested.impl.F.type: type = fn_type @D.as.SelfNested.impl.F [concrete]
  102. // CHECK:STDOUT: %D.as.SelfNested.impl.F: %D.as.SelfNested.impl.F.type = struct_value () [concrete]
  103. // CHECK:STDOUT: %SelfNested.facet.372: %SelfNested.type = facet_value %D, (%SelfNested.impl_witness.130) [concrete]
  104. // CHECK:STDOUT: %SelfNested.WithSelf.F.type.88c: type = fn_type @SelfNested.WithSelf.F, @SelfNested.WithSelf(%SelfNested.facet.372) [concrete]
  105. // CHECK:STDOUT: %SelfNested.WithSelf.F.02f: %SelfNested.WithSelf.F.type.88c = struct_value () [concrete]
  106. // CHECK:STDOUT: }
  107. // CHECK:STDOUT:
  108. // CHECK:STDOUT: file {
  109. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  110. // CHECK:STDOUT: .UseSelf = %UseSelf.decl
  111. // CHECK:STDOUT: .C = %C.decl
  112. // CHECK:STDOUT: .D = %D.decl
  113. // CHECK:STDOUT: .SelfNested = %SelfNested.decl
  114. // CHECK:STDOUT: }
  115. // CHECK:STDOUT: %UseSelf.decl: type = interface_decl @UseSelf [concrete = constants.%UseSelf.type] {} {}
  116. // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
  117. // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {}
  118. // CHECK:STDOUT: impl_decl @C.as.UseSelf.impl [concrete] {} {
  119. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  120. // CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [concrete = constants.%UseSelf.type]
  121. // CHECK:STDOUT: }
  122. // CHECK:STDOUT: impl_decl @D.as.UseSelf.impl [concrete] {} {
  123. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  124. // CHECK:STDOUT: %UseSelf.ref: type = name_ref UseSelf, file.%UseSelf.decl [concrete = constants.%UseSelf.type]
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT: %SelfNested.decl: type = interface_decl @SelfNested [concrete = constants.%SelfNested.type] {} {}
  127. // CHECK:STDOUT: impl_decl @C.as.SelfNested.impl [concrete] {} {
  128. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
  129. // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type]
  130. // CHECK:STDOUT: }
  131. // CHECK:STDOUT: impl_decl @D.as.SelfNested.impl [concrete] {} {
  132. // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D]
  133. // CHECK:STDOUT: %SelfNested.ref: type = name_ref SelfNested, file.%SelfNested.decl [concrete = constants.%SelfNested.type]
  134. // CHECK:STDOUT: }
  135. // CHECK:STDOUT: }
  136. // CHECK:STDOUT:
  137. // CHECK:STDOUT: interface @UseSelf {
  138. // CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f7b]
  139. // CHECK:STDOUT: %UseSelf.WithSelf.decl = interface_with_self_decl @UseSelf [concrete]
  140. // CHECK:STDOUT:
  141. // CHECK:STDOUT: !with Self:
  142. // CHECK:STDOUT: %UseSelf.WithSelf.F.decl: @UseSelf.WithSelf.%UseSelf.WithSelf.F.type (%UseSelf.WithSelf.F.type.ad8) = fn_decl @UseSelf.WithSelf.F [symbolic = @UseSelf.WithSelf.%UseSelf.WithSelf.F (constants.%UseSelf.WithSelf.F.de0)] {
  143. // CHECK:STDOUT: %self.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.a02) = value_param_pattern [concrete]
  144. // CHECK:STDOUT: %self.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.a02) = at_binding_pattern self, %self.param_patt [concrete]
  145. // CHECK:STDOUT: %x.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.a02) = value_param_pattern [concrete]
  146. // CHECK:STDOUT: %x.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.a02) = at_binding_pattern x, %x.param_patt [concrete]
  147. // CHECK:STDOUT: %return.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.a02) = out_param_pattern [concrete]
  148. // CHECK:STDOUT: %return.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.a02) = return_slot_pattern %return.param_patt, %.loc16_32.2 [concrete]
  149. // CHECK:STDOUT: } {
  150. // CHECK:STDOUT: %Self.ref.loc16_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.f7b)]
  151. // CHECK:STDOUT: %Self.as_type.loc16_32: type = facet_access_type %Self.ref.loc16_32 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  152. // CHECK:STDOUT: %.loc16_32.2: type = converted %Self.ref.loc16_32, %Self.as_type.loc16_32 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  153. // CHECK:STDOUT: %.loc16_32.3: Core.Form = init_form %.loc16_32.2 [symbolic = %.loc16_32.1 (constants.%.4e5)]
  154. // CHECK:STDOUT: %self.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563) = value_param call_param0
  155. // CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)] {
  156. // CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.f7b)]
  157. // CHECK:STDOUT: %Self.as_type.loc16_14.2: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  158. // CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT: %self: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563) = value_binding self, %self.param
  161. // CHECK:STDOUT: %x.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563) = value_param call_param1
  162. // CHECK:STDOUT: %.loc16_23.1: type = splice_block %.loc16_23.2 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)] {
  163. // CHECK:STDOUT: %Self.ref.loc16_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.f7b)]
  164. // CHECK:STDOUT: %Self.as_type.loc16_23: type = facet_access_type %Self.ref.loc16_23 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  165. // CHECK:STDOUT: %.loc16_23.2: type = converted %Self.ref.loc16_23, %Self.as_type.loc16_23 [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT: %x: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563) = value_binding x, %x.param
  168. // CHECK:STDOUT: %return.param: ref @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563) = out_param call_param2
  169. // CHECK:STDOUT: %return: ref @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563) = return_slot %return.param
  170. // CHECK:STDOUT: }
  171. // CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %UseSelf.WithSelf.F.decl [concrete = constants.%assoc0.44b]
  172. // CHECK:STDOUT:
  173. // CHECK:STDOUT: !members:
  174. // CHECK:STDOUT: .Self = %Self
  175. // CHECK:STDOUT: .F = @UseSelf.WithSelf.%assoc0
  176. // CHECK:STDOUT: witness = (@UseSelf.WithSelf.%UseSelf.WithSelf.F.decl)
  177. // CHECK:STDOUT:
  178. // CHECK:STDOUT: !requires:
  179. // CHECK:STDOUT: }
  180. // CHECK:STDOUT:
  181. // CHECK:STDOUT: interface @SelfNested {
  182. // CHECK:STDOUT: %Self: %SelfNested.type = symbolic_binding Self, 0 [symbolic = constants.%Self.aed]
  183. // CHECK:STDOUT: %SelfNested.WithSelf.decl = interface_with_self_decl @SelfNested [concrete]
  184. // CHECK:STDOUT:
  185. // CHECK:STDOUT: !with Self:
  186. // CHECK:STDOUT: %SelfNested.WithSelf.F.decl: @SelfNested.WithSelf.%SelfNested.WithSelf.F.type (%SelfNested.WithSelf.F.type.430) = fn_decl @SelfNested.WithSelf.F [symbolic = @SelfNested.WithSelf.%SelfNested.WithSelf.F (constants.%SelfNested.WithSelf.F.257)] {
  187. // CHECK:STDOUT: %x.param_patt: @SelfNested.WithSelf.F.%pattern_type (%pattern_type.4b0) = value_param_pattern [concrete]
  188. // CHECK:STDOUT: %x.patt: @SelfNested.WithSelf.F.%pattern_type (%pattern_type.4b0) = at_binding_pattern x, %x.param_patt [concrete]
  189. // CHECK:STDOUT: } {
  190. // CHECK:STDOUT: %x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.e6d) = value_param call_param0
  191. // CHECK:STDOUT: %.loc32_37.1: type = splice_block %.loc32_37.3 [symbolic = %tuple.type (constants.%tuple.type.e6d)] {
  192. // CHECK:STDOUT: %Self.ref.loc32_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)]
  193. // CHECK:STDOUT: %Self.as_type.loc32_16.2: type = facet_access_type %Self.ref.loc32_12 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.b90)]
  194. // CHECK:STDOUT: %.loc32_16: type = converted %Self.ref.loc32_12, %Self.as_type.loc32_16.2 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.b90)]
  195. // CHECK:STDOUT: %ptr.loc32_16.2: type = ptr_type %.loc32_16 [symbolic = %ptr.loc32_16.1 (constants.%ptr.ad7)]
  196. // CHECK:STDOUT: %Self.ref.loc32_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)]
  197. // CHECK:STDOUT: %Self.as_type.loc32_24: type = facet_access_type %Self.ref.loc32_24 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.b90)]
  198. // CHECK:STDOUT: %.loc32_24: type = converted %Self.ref.loc32_24, %Self.as_type.loc32_24 [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.b90)]
  199. // CHECK:STDOUT: %.loc32_35.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  200. // CHECK:STDOUT: %.loc32_35.2: type = converted %.loc32_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  201. // CHECK:STDOUT: %struct_type.x.y.loc32_36.2: type = struct_type {.x: @SelfNested.WithSelf.F.%Self.as_type.loc32_16.1 (%Self.as_type.b90), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.1c0)]
  202. // CHECK:STDOUT: %.loc32_37.2: %tuple.type.24b = tuple_literal (%ptr.loc32_16.2, %struct_type.x.y.loc32_36.2) [symbolic = %tuple (constants.%tuple.3de)]
  203. // CHECK:STDOUT: %.loc32_37.3: type = converted %.loc32_37.2, constants.%tuple.type.e6d [symbolic = %tuple.type (constants.%tuple.type.e6d)]
  204. // CHECK:STDOUT: }
  205. // CHECK:STDOUT: %x: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.e6d) = value_binding x, %x.param
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %SelfNested.WithSelf.F.decl [concrete = constants.%assoc0.da4]
  208. // CHECK:STDOUT:
  209. // CHECK:STDOUT: !members:
  210. // CHECK:STDOUT: .Self = %Self
  211. // CHECK:STDOUT: .F = @SelfNested.WithSelf.%assoc0
  212. // CHECK:STDOUT: witness = (@SelfNested.WithSelf.%SelfNested.WithSelf.F.decl)
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: !requires:
  215. // CHECK:STDOUT: }
  216. // CHECK:STDOUT:
  217. // CHECK:STDOUT: impl @C.as.UseSelf.impl: %C.ref as %UseSelf.ref {
  218. // CHECK:STDOUT: %C.as.UseSelf.impl.F.decl: %C.as.UseSelf.impl.F.type = fn_decl @C.as.UseSelf.impl.F [concrete = constants.%C.as.UseSelf.impl.F] {
  219. // CHECK:STDOUT: %self.param_patt: %pattern_type.7c7 = value_param_pattern [concrete]
  220. // CHECK:STDOUT: %self.patt: %pattern_type.7c7 = at_binding_pattern self, %self.param_patt [concrete]
  221. // CHECK:STDOUT: %x.param_patt: %pattern_type.7c7 = value_param_pattern [concrete]
  222. // CHECK:STDOUT: %x.patt: %pattern_type.7c7 = at_binding_pattern x, %x.param_patt [concrete]
  223. // CHECK:STDOUT: %return.param_patt: %pattern_type.7c7 = out_param_pattern [concrete]
  224. // CHECK:STDOUT: %return.patt: %pattern_type.7c7 = return_slot_pattern %return.param_patt, %C.ref.loc24_40 [concrete]
  225. // CHECK:STDOUT: } {
  226. // CHECK:STDOUT: %C.ref.loc24_40: type = name_ref C, file.%C.decl [concrete = constants.%C]
  227. // CHECK:STDOUT: %.loc24_40: Core.Form = init_form %C.ref.loc24_40 [concrete = constants.%.a69]
  228. // CHECK:STDOUT: %self.param: %C = value_param call_param0
  229. // CHECK:STDOUT: %C.ref.loc24_21: type = name_ref C, file.%C.decl [concrete = constants.%C]
  230. // CHECK:STDOUT: %self: %C = value_binding self, %self.param
  231. // CHECK:STDOUT: %x.param: %C = value_param call_param1
  232. // CHECK:STDOUT: %C.ref.loc24_34: type = name_ref C, file.%C.decl [concrete = constants.%C]
  233. // CHECK:STDOUT: %x: %C = value_binding x, %x.param
  234. // CHECK:STDOUT: %return.param: ref %C = out_param call_param2
  235. // CHECK:STDOUT: %return: ref %C = return_slot %return.param
  236. // CHECK:STDOUT: }
  237. // CHECK:STDOUT: %UseSelf.impl_witness_table = impl_witness_table (%C.as.UseSelf.impl.F.decl), @C.as.UseSelf.impl [concrete]
  238. // CHECK:STDOUT: %UseSelf.impl_witness: <witness> = impl_witness %UseSelf.impl_witness_table [concrete = constants.%UseSelf.impl_witness.3c4]
  239. // CHECK:STDOUT:
  240. // CHECK:STDOUT: !members:
  241. // CHECK:STDOUT: .C = <poisoned>
  242. // CHECK:STDOUT: .F = %C.as.UseSelf.impl.F.decl
  243. // CHECK:STDOUT: witness = %UseSelf.impl_witness
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT:
  246. // CHECK:STDOUT: impl @D.as.UseSelf.impl: %D.ref as %UseSelf.ref {
  247. // CHECK:STDOUT: %D.as.UseSelf.impl.F.decl: %D.as.UseSelf.impl.F.type = fn_decl @D.as.UseSelf.impl.F [concrete = constants.%D.as.UseSelf.impl.F] {
  248. // CHECK:STDOUT: %self.param_patt: %pattern_type.9c8 = value_param_pattern [concrete]
  249. // CHECK:STDOUT: %self.patt: %pattern_type.9c8 = at_binding_pattern self, %self.param_patt [concrete]
  250. // CHECK:STDOUT: %x.param_patt: %pattern_type.9c8 = value_param_pattern [concrete]
  251. // CHECK:STDOUT: %x.patt: %pattern_type.9c8 = at_binding_pattern x, %x.param_patt [concrete]
  252. // CHECK:STDOUT: %return.param_patt: %pattern_type.9c8 = out_param_pattern [concrete]
  253. // CHECK:STDOUT: %return.patt: %pattern_type.9c8 = return_slot_pattern %return.param_patt, %Self.ref.loc28_46 [concrete]
  254. // CHECK:STDOUT: } {
  255. // CHECK:STDOUT: %Self.ref.loc28_46: type = name_ref Self, @D.as.UseSelf.impl.%D.ref [concrete = constants.%D]
  256. // CHECK:STDOUT: %.loc28_46: Core.Form = init_form %Self.ref.loc28_46 [concrete = constants.%.9a5]
  257. // CHECK:STDOUT: %self.param: %D = value_param call_param0
  258. // CHECK:STDOUT: %Self.ref.loc28_21: type = name_ref Self, @D.as.UseSelf.impl.%D.ref [concrete = constants.%D]
  259. // CHECK:STDOUT: %self: %D = value_binding self, %self.param
  260. // CHECK:STDOUT: %x.param: %D = value_param call_param1
  261. // CHECK:STDOUT: %Self.ref.loc28_37: type = name_ref Self, @D.as.UseSelf.impl.%D.ref [concrete = constants.%D]
  262. // CHECK:STDOUT: %x: %D = value_binding x, %x.param
  263. // CHECK:STDOUT: %return.param: ref %D = out_param call_param2
  264. // CHECK:STDOUT: %return: ref %D = return_slot %return.param
  265. // CHECK:STDOUT: }
  266. // CHECK:STDOUT: %UseSelf.impl_witness_table = impl_witness_table (%D.as.UseSelf.impl.F.decl), @D.as.UseSelf.impl [concrete]
  267. // CHECK:STDOUT: %UseSelf.impl_witness: <witness> = impl_witness %UseSelf.impl_witness_table [concrete = constants.%UseSelf.impl_witness.22d]
  268. // CHECK:STDOUT:
  269. // CHECK:STDOUT: !members:
  270. // CHECK:STDOUT: .F = %D.as.UseSelf.impl.F.decl
  271. // CHECK:STDOUT: witness = %UseSelf.impl_witness
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT:
  274. // CHECK:STDOUT: impl @C.as.SelfNested.impl: %C.ref as %SelfNested.ref {
  275. // CHECK:STDOUT: %C.as.SelfNested.impl.F.decl: %C.as.SelfNested.impl.F.type = fn_decl @C.as.SelfNested.impl.F [concrete = constants.%C.as.SelfNested.impl.F] {
  276. // CHECK:STDOUT: %x.param_patt: %pattern_type.137 = value_param_pattern [concrete]
  277. // CHECK:STDOUT: %x.patt: %pattern_type.137 = at_binding_pattern x, %x.param_patt [concrete]
  278. // CHECK:STDOUT: } {
  279. // CHECK:STDOUT: %x.param: %tuple.type.2f1 = value_param call_param0
  280. // CHECK:STDOUT: %.loc36_31.1: type = splice_block %.loc36_31.3 [concrete = constants.%tuple.type.2f1] {
  281. // CHECK:STDOUT: %C.ref.loc36_12: type = name_ref C, file.%C.decl [concrete = constants.%C]
  282. // CHECK:STDOUT: %ptr: type = ptr_type %C.ref.loc36_12 [concrete = constants.%ptr.31e]
  283. // CHECK:STDOUT: %C.ref.loc36_21: type = name_ref C, file.%C.decl [concrete = constants.%C]
  284. // CHECK:STDOUT: %.loc36_29.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  285. // CHECK:STDOUT: %.loc36_29.2: type = converted %.loc36_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  286. // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %C, .y: %empty_tuple.type} [concrete = constants.%struct_type.x.y.710]
  287. // CHECK:STDOUT: %.loc36_31.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) [concrete = constants.%tuple.509]
  288. // CHECK:STDOUT: %.loc36_31.3: type = converted %.loc36_31.2, constants.%tuple.type.2f1 [concrete = constants.%tuple.type.2f1]
  289. // CHECK:STDOUT: }
  290. // CHECK:STDOUT: %x: %tuple.type.2f1 = value_binding x, %x.param
  291. // CHECK:STDOUT: }
  292. // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (%C.as.SelfNested.impl.F.decl), @C.as.SelfNested.impl [concrete]
  293. // CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.a03]
  294. // CHECK:STDOUT:
  295. // CHECK:STDOUT: !members:
  296. // CHECK:STDOUT: .C = <poisoned>
  297. // CHECK:STDOUT: .F = %C.as.SelfNested.impl.F.decl
  298. // CHECK:STDOUT: witness = %SelfNested.impl_witness
  299. // CHECK:STDOUT: }
  300. // CHECK:STDOUT:
  301. // CHECK:STDOUT: impl @D.as.SelfNested.impl: %D.ref as %SelfNested.ref {
  302. // CHECK:STDOUT: %D.as.SelfNested.impl.F.decl: %D.as.SelfNested.impl.F.type = fn_decl @D.as.SelfNested.impl.F [concrete = constants.%D.as.SelfNested.impl.F] {
  303. // CHECK:STDOUT: %x.param_patt: %pattern_type.d05 = value_param_pattern [concrete]
  304. // CHECK:STDOUT: %x.patt: %pattern_type.d05 = at_binding_pattern x, %x.param_patt [concrete]
  305. // CHECK:STDOUT: } {
  306. // CHECK:STDOUT: %x.param: %tuple.type.e0d = value_param call_param0
  307. // CHECK:STDOUT: %.loc40_37.1: type = splice_block %.loc40_37.3 [concrete = constants.%tuple.type.e0d] {
  308. // CHECK:STDOUT: %Self.ref.loc40_12: type = name_ref Self, @D.as.SelfNested.impl.%D.ref [concrete = constants.%D]
  309. // CHECK:STDOUT: %ptr: type = ptr_type %Self.ref.loc40_12 [concrete = constants.%ptr.805]
  310. // CHECK:STDOUT: %Self.ref.loc40_24: type = name_ref Self, @D.as.SelfNested.impl.%D.ref [concrete = constants.%D]
  311. // CHECK:STDOUT: %.loc40_35.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  312. // CHECK:STDOUT: %.loc40_35.2: type = converted %.loc40_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  313. // CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %D, .y: %empty_tuple.type} [concrete = constants.%struct_type.x.y.3e1]
  314. // CHECK:STDOUT: %.loc40_37.2: %tuple.type.24b = tuple_literal (%ptr, %struct_type.x.y) [concrete = constants.%tuple.21a]
  315. // CHECK:STDOUT: %.loc40_37.3: type = converted %.loc40_37.2, constants.%tuple.type.e0d [concrete = constants.%tuple.type.e0d]
  316. // CHECK:STDOUT: }
  317. // CHECK:STDOUT: %x: %tuple.type.e0d = value_binding x, %x.param
  318. // CHECK:STDOUT: }
  319. // CHECK:STDOUT: %SelfNested.impl_witness_table = impl_witness_table (%D.as.SelfNested.impl.F.decl), @D.as.SelfNested.impl [concrete]
  320. // CHECK:STDOUT: %SelfNested.impl_witness: <witness> = impl_witness %SelfNested.impl_witness_table [concrete = constants.%SelfNested.impl_witness.130]
  321. // CHECK:STDOUT:
  322. // CHECK:STDOUT: !members:
  323. // CHECK:STDOUT: .F = %D.as.SelfNested.impl.F.decl
  324. // CHECK:STDOUT: witness = %SelfNested.impl_witness
  325. // CHECK:STDOUT: }
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: class @C {
  328. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  329. // CHECK:STDOUT: complete_type_witness = %complete_type
  330. // CHECK:STDOUT:
  331. // CHECK:STDOUT: !members:
  332. // CHECK:STDOUT: .Self = constants.%C
  333. // CHECK:STDOUT: }
  334. // CHECK:STDOUT:
  335. // CHECK:STDOUT: class @D {
  336. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
  337. // CHECK:STDOUT: complete_type_witness = %complete_type
  338. // CHECK:STDOUT:
  339. // CHECK:STDOUT: !members:
  340. // CHECK:STDOUT: .Self = constants.%D
  341. // CHECK:STDOUT: }
  342. // CHECK:STDOUT:
  343. // CHECK:STDOUT: generic fn @UseSelf.WithSelf.F(@UseSelf.%Self: %UseSelf.type) {
  344. // CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f7b)]
  345. // CHECK:STDOUT: %Self.as_type.loc16_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_14.1 (constants.%Self.as_type.563)]
  346. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc16_14.1 [symbolic = %pattern_type (constants.%pattern_type.a02)]
  347. // CHECK:STDOUT: %.loc16_32.1: Core.Form = init_form %Self.as_type.loc16_14.1 [symbolic = %.loc16_32.1 (constants.%.4e5)]
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: fn(%self.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563), %x.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563)) -> out %return.param: @UseSelf.WithSelf.F.%Self.as_type.loc16_14.1 (%Self.as_type.563);
  350. // CHECK:STDOUT: }
  351. // CHECK:STDOUT:
  352. // CHECK:STDOUT: fn @C.as.UseSelf.impl.F(%self.param: %C, %x.param: %C) -> out %return.param: %C {
  353. // CHECK:STDOUT: !entry:
  354. // CHECK:STDOUT: %.loc24_52.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  355. // CHECK:STDOUT: %.loc24_52.2: init %C to %return.param = class_init () [concrete = constants.%C.val]
  356. // CHECK:STDOUT: %.loc24_53: init %C = converted %.loc24_52.1, %.loc24_52.2 [concrete = constants.%C.val]
  357. // CHECK:STDOUT: return %.loc24_53 to %return.param
  358. // CHECK:STDOUT: }
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: fn @D.as.UseSelf.impl.F(%self.param: %D, %x.param: %D) -> out %return.param: %D {
  361. // CHECK:STDOUT: !entry:
  362. // CHECK:STDOUT: %.loc28_61.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
  363. // CHECK:STDOUT: %.loc28_61.2: init %D to %return.param = class_init () [concrete = constants.%D.val]
  364. // CHECK:STDOUT: %.loc28_62: init %D = converted %.loc28_61.1, %.loc28_61.2 [concrete = constants.%D.val]
  365. // CHECK:STDOUT: return %.loc28_62 to %return.param
  366. // CHECK:STDOUT: }
  367. // CHECK:STDOUT:
  368. // CHECK:STDOUT: generic fn @SelfNested.WithSelf.F(@SelfNested.%Self: %SelfNested.type) {
  369. // CHECK:STDOUT: %Self: %SelfNested.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.aed)]
  370. // CHECK:STDOUT: %Self.as_type.loc32_16.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc32_16.1 (constants.%Self.as_type.b90)]
  371. // CHECK:STDOUT: %ptr.loc32_16.1: type = ptr_type %Self.as_type.loc32_16.1 [symbolic = %ptr.loc32_16.1 (constants.%ptr.ad7)]
  372. // CHECK:STDOUT: %struct_type.x.y.loc32_36.1: type = struct_type {.x: @SelfNested.WithSelf.F.%Self.as_type.loc32_16.1 (%Self.as_type.b90), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.1c0)]
  373. // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%ptr.loc32_16.1, %struct_type.x.y.loc32_36.1) [symbolic = %tuple (constants.%tuple.3de)]
  374. // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc32_16.1, %struct_type.x.y.loc32_36.1) [symbolic = %tuple.type (constants.%tuple.type.e6d)]
  375. // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.4b0)]
  376. // CHECK:STDOUT:
  377. // CHECK:STDOUT: fn(%x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.e6d));
  378. // CHECK:STDOUT: }
  379. // CHECK:STDOUT:
  380. // CHECK:STDOUT: fn @C.as.SelfNested.impl.F(%x.param: %tuple.type.2f1);
  381. // CHECK:STDOUT:
  382. // CHECK:STDOUT: fn @D.as.SelfNested.impl.F(%x.param: %tuple.type.e0d);
  383. // CHECK:STDOUT:
  384. // CHECK:STDOUT: specific @UseSelf.WithSelf(constants.%Self.f7b) {
  385. // CHECK:STDOUT: !definition:
  386. // CHECK:STDOUT: %Self => constants.%Self.f7b
  387. // CHECK:STDOUT: %UseSelf.WithSelf.F.type => constants.%UseSelf.WithSelf.F.type.ad8
  388. // CHECK:STDOUT: %UseSelf.WithSelf.F => constants.%UseSelf.WithSelf.F.de0
  389. // CHECK:STDOUT: }
  390. // CHECK:STDOUT:
  391. // CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%Self.f7b) {
  392. // CHECK:STDOUT: %Self => constants.%Self.f7b
  393. // CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%Self.as_type.563
  394. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a02
  395. // CHECK:STDOUT: %.loc16_32.1 => constants.%.4e5
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT:
  398. // CHECK:STDOUT: specific @UseSelf.WithSelf(constants.%UseSelf.facet.d4d) {
  399. // CHECK:STDOUT: !definition:
  400. // CHECK:STDOUT: %Self => constants.%UseSelf.facet.d4d
  401. // CHECK:STDOUT: %UseSelf.WithSelf.F.type => constants.%UseSelf.WithSelf.F.type.a7f
  402. // CHECK:STDOUT: %UseSelf.WithSelf.F => constants.%UseSelf.WithSelf.F.67c
  403. // CHECK:STDOUT: }
  404. // CHECK:STDOUT:
  405. // CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%UseSelf.facet.d4d) {
  406. // CHECK:STDOUT: %Self => constants.%UseSelf.facet.d4d
  407. // CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%C
  408. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7
  409. // CHECK:STDOUT: %.loc16_32.1 => constants.%.a69
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT:
  412. // CHECK:STDOUT: specific @UseSelf.WithSelf(constants.%UseSelf.facet.6f8) {
  413. // CHECK:STDOUT: !definition:
  414. // CHECK:STDOUT: %Self => constants.%UseSelf.facet.6f8
  415. // CHECK:STDOUT: %UseSelf.WithSelf.F.type => constants.%UseSelf.WithSelf.F.type.37f
  416. // CHECK:STDOUT: %UseSelf.WithSelf.F => constants.%UseSelf.WithSelf.F.633
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%UseSelf.facet.6f8) {
  420. // CHECK:STDOUT: %Self => constants.%UseSelf.facet.6f8
  421. // CHECK:STDOUT: %Self.as_type.loc16_14.1 => constants.%D
  422. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9c8
  423. // CHECK:STDOUT: %.loc16_32.1 => constants.%.9a5
  424. // CHECK:STDOUT: }
  425. // CHECK:STDOUT:
  426. // CHECK:STDOUT: specific @SelfNested.WithSelf(constants.%Self.aed) {
  427. // CHECK:STDOUT: !definition:
  428. // CHECK:STDOUT: %Self => constants.%Self.aed
  429. // CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.430
  430. // CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.257
  431. // CHECK:STDOUT: }
  432. // CHECK:STDOUT:
  433. // CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%Self.aed) {
  434. // CHECK:STDOUT: %Self => constants.%Self.aed
  435. // CHECK:STDOUT: %Self.as_type.loc32_16.1 => constants.%Self.as_type.b90
  436. // CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.ad7
  437. // CHECK:STDOUT: %struct_type.x.y.loc32_36.1 => constants.%struct_type.x.y.1c0
  438. // CHECK:STDOUT: %tuple => constants.%tuple.3de
  439. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.e6d
  440. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4b0
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: specific @SelfNested.WithSelf(constants.%SelfNested.facet.f22) {
  444. // CHECK:STDOUT: !definition:
  445. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.f22
  446. // CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.f28
  447. // CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.45f
  448. // CHECK:STDOUT: }
  449. // CHECK:STDOUT:
  450. // CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%SelfNested.facet.f22) {
  451. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.f22
  452. // CHECK:STDOUT: %Self.as_type.loc32_16.1 => constants.%C
  453. // CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.31e
  454. // CHECK:STDOUT: %struct_type.x.y.loc32_36.1 => constants.%struct_type.x.y.710
  455. // CHECK:STDOUT: %tuple => constants.%tuple.509
  456. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2f1
  457. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.137
  458. // CHECK:STDOUT: }
  459. // CHECK:STDOUT:
  460. // CHECK:STDOUT: specific @SelfNested.WithSelf(constants.%SelfNested.facet.372) {
  461. // CHECK:STDOUT: !definition:
  462. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.372
  463. // CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.88c
  464. // CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.02f
  465. // CHECK:STDOUT: }
  466. // CHECK:STDOUT:
  467. // CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%SelfNested.facet.372) {
  468. // CHECK:STDOUT: %Self => constants.%SelfNested.facet.372
  469. // CHECK:STDOUT: %Self.as_type.loc32_16.1 => constants.%D
  470. // CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.805
  471. // CHECK:STDOUT: %struct_type.x.y.loc32_36.1 => constants.%struct_type.x.y.3e1
  472. // CHECK:STDOUT: %tuple => constants.%tuple.21a
  473. // CHECK:STDOUT: %tuple.type => constants.%tuple.type.e0d
  474. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d05
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT: