assoc_const_self.carbon 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  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/assoc_const_self.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/assoc_const_self.carbon
  10. // --- assoc_const_self.carbon
  11. library "[[@TEST_NAME]]";
  12. interface I {
  13. let V:! Self;
  14. }
  15. impl {} as I where .V = {} {}
  16. impl i32 as I where .V = 0 {}
  17. // --- fail_assoc_const_mismatch.carbon
  18. library "[[@TEST_NAME]]";
  19. interface I {
  20. let V:! Self;
  21. }
  22. // CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+7]]:12: error: cannot implicitly convert from `Core.IntLiteral` to `{}` [ImplicitAsConversionFailure]
  23. // CHECK:STDERR: impl {} as I where .V = 0 {}
  24. // CHECK:STDERR: ^~~~~~~~~~~~~~
  25. // CHECK:STDERR: fail_assoc_const_mismatch.carbon:[[@LINE+4]]:12: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs({})` [MissingImplInMemberAccessNote]
  26. // CHECK:STDERR: impl {} as I where .V = 0 {}
  27. // CHECK:STDERR: ^~~~~~~~~~~~~~
  28. // CHECK:STDERR:
  29. impl {} as I where .V = 0 {}
  30. // --- fail_assoc_const_not_constant_after_conversion.carbon
  31. library "[[@TEST_NAME]]";
  32. interface I {
  33. let V:! Self;
  34. }
  35. class C {}
  36. impl () as Core.ImplicitAs(C) {
  37. fn Convert[self: ()]() -> C { return {}; }
  38. }
  39. // CHECK:STDERR: fail_assoc_const_not_constant_after_conversion.carbon:[[@LINE+4]]:11: error: associated constant V given value that is not constant after conversion to `C` [AssociatedConstantNotConstantAfterConversion]
  40. // CHECK:STDERR: impl C as I where .V = () {}
  41. // CHECK:STDERR: ^~~~~~~~~~~~~~~
  42. // CHECK:STDERR:
  43. impl C as I where .V = () {}
  44. // --- fail_monomorphization_failure.carbon
  45. library "[[@TEST_NAME]]";
  46. interface I(N:! Core.IntLiteral()) {
  47. // CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+3]]:12: error: array bound of -1 is negative [ArrayBoundNegative]
  48. // CHECK:STDERR: let V:! [Self; N];
  49. // CHECK:STDERR: ^~~~
  50. let V:! [Self; N];
  51. }
  52. // CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+4]]:24: note: in `V` used here [ResolvingSpecificHere]
  53. // CHECK:STDERR: impl {} as I(-1) where .V = () {}
  54. // CHECK:STDERR: ^~
  55. // CHECK:STDERR:
  56. impl {} as I(-1) where .V = () {}
  57. // --- fail_todo_constrained_fn.carbon
  58. library "[[@TEST_NAME]]";
  59. interface I {
  60. let V:! Self;
  61. }
  62. fn F(T:! I where {} impls Core.ImplicitAs(.Self) and .V = {});
  63. fn CallF() {
  64. // TODO: This call should eventually work.
  65. // CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE+10]]:3: error: cannot implicitly convert from `{}` to `I where .(I.V) = {} and...` [ImplicitAsConversionFailure]
  66. // CHECK:STDERR: F({});
  67. // CHECK:STDERR: ^~~~~
  68. // CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE+7]]:3: note: type `{}` does not implement interface `Core.ImplicitAs(I where .(I.V) = {} and...)` [MissingImplInMemberAccessNote]
  69. // CHECK:STDERR: F({});
  70. // CHECK:STDERR: ^~~~~
  71. // CHECK:STDERR: fail_todo_constrained_fn.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
  72. // CHECK:STDERR: fn F(T:! I where {} impls Core.ImplicitAs(.Self) and .V = {});
  73. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. // CHECK:STDERR:
  75. F({});
  76. }
  77. // CHECK:STDOUT: --- assoc_const_self.carbon
  78. // CHECK:STDOUT:
  79. // CHECK:STDOUT: constants {
  80. // CHECK:STDOUT: %I.type: type = facet_type <@I> [template]
  81. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  82. // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
  83. // CHECK:STDOUT: %require_complete.9b1: <witness> = require_complete_type %Self.as_type.b70 [symbolic]
  84. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [template]
  85. // CHECK:STDOUT: %assoc0.a1d: %I.assoc_type = assoc_entity element0, @I.%V [template]
  86. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
  87. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic]
  88. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic]
  89. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self [symbolic]
  90. // CHECK:STDOUT: %I.facet.1f7: %I.type = facet_value %.Self.as_type, %.Self.as_wit [symbolic]
  91. // CHECK:STDOUT: %require_complete.d0c: <witness> = require_complete_type %.Self.as_type [symbolic]
  92. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic]
  93. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template]
  94. // CHECK:STDOUT: %I_where.type.5de: type = facet_type <@I where %impl.elem0 = %empty_struct> [template]
  95. // CHECK:STDOUT: %impl_witness.a4f: <witness> = impl_witness (%empty_struct) [template]
  96. // CHECK:STDOUT: %I.facet.27e: %I.type = facet_value %empty_struct_type, %impl_witness.a4f [template]
  97. // CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [template]
  98. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template]
  99. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template]
  100. // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [template]
  101. // CHECK:STDOUT: %I_where.type.cad: type = facet_type <@I where %impl.elem0 = %int_0.5c6> [template]
  102. // CHECK:STDOUT: %impl_witness.6f4: <witness> = impl_witness (%int_0.6a9) [template]
  103. // CHECK:STDOUT: %I.facet.401: %I.type = facet_value %i32, %impl_witness.6f4 [template]
  104. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template]
  105. // CHECK:STDOUT: %complete_type.f8a: <witness> = complete_type_witness %i32.builtin [template]
  106. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template]
  107. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [template]
  108. // CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.2(%int_32) [template]
  109. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.2(%int_32) [template]
  110. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [template]
  111. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, %impl_witness.d39 [template]
  112. // CHECK:STDOUT: %.a0b: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [template]
  113. // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_0.5c6, %Convert.956 [template]
  114. // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.bound, @Convert.2(%int_32) [template]
  115. // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [template]
  116. // CHECK:STDOUT: }
  117. // CHECK:STDOUT:
  118. // CHECK:STDOUT: imports {
  119. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  120. // CHECK:STDOUT: .Int = %Core.Int
  121. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  122. // CHECK:STDOUT: import Core//prelude
  123. // CHECK:STDOUT: import Core//prelude/...
  124. // CHECK:STDOUT: }
  125. // CHECK:STDOUT: }
  126. // CHECK:STDOUT:
  127. // CHECK:STDOUT: file {
  128. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  129. // CHECK:STDOUT: .Core = imports.%Core
  130. // CHECK:STDOUT: .I = %I.decl
  131. // CHECK:STDOUT: }
  132. // CHECK:STDOUT: %Core.import = import Core
  133. // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {}
  134. // CHECK:STDOUT: impl_decl @impl.1 [template] {} {
  135. // CHECK:STDOUT: %.loc8_7.1: %empty_struct_type = struct_literal ()
  136. // CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
  137. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
  138. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self]
  139. // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self]
  140. // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [template = constants.%assoc0.a1d]
  141. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type]
  142. // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type]
  143. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit]
  144. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0]
  145. // CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal ()
  146. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct]
  147. // CHECK:STDOUT: %.loc8_26.2: %empty_struct_type = converted %.loc8_26.1, %empty_struct [template = constants.%empty_struct]
  148. // CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [template = constants.%I_where.type.5de] {
  149. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_26.2
  150. // CHECK:STDOUT: }
  151. // CHECK:STDOUT: }
  152. // CHECK:STDOUT: %impl_witness.loc8: <witness> = impl_witness (constants.%empty_struct) [template = constants.%impl_witness.a4f]
  153. // CHECK:STDOUT: impl_decl @impl.45 [template] {} {
  154. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32]
  155. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32]
  156. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
  157. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self]
  158. // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self]
  159. // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [template = constants.%assoc0.a1d]
  160. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type]
  161. // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type]
  162. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit]
  163. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0]
  164. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.5c6]
  165. // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [template = constants.%I_where.type.cad] {
  166. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0
  167. // CHECK:STDOUT: }
  168. // CHECK:STDOUT: }
  169. // CHECK:STDOUT: %impl_witness.loc10: <witness> = impl_witness (constants.%int_0.6a9) [template = constants.%impl_witness.6f4]
  170. // CHECK:STDOUT: %impl.elem0: %.a0b = impl_witness_access constants.%impl_witness.d39, element0 [template = constants.%Convert.956]
  171. // CHECK:STDOUT: %bound_method: <bound method> = bound_method constants.%int_0.5c6, %impl.elem0 [template = constants.%Convert.bound]
  172. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %bound_method, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn]
  173. // CHECK:STDOUT: %int.convert_checked: init %i32 = call %specific_fn(constants.%int_0.5c6) [template = constants.%int_0.6a9]
  174. // CHECK:STDOUT: %.loc10_15.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.6a9]
  175. // CHECK:STDOUT: %.loc10_15.2: %i32 = converted constants.%int_0.5c6, %.loc10_15.1 [template = constants.%int_0.6a9]
  176. // CHECK:STDOUT: }
  177. // CHECK:STDOUT:
  178. // CHECK:STDOUT: interface @I {
  179. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  180. // CHECK:STDOUT: %V: @V.%Self.as_type (%Self.as_type.b70) = assoc_const_decl @V [template] {
  181. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [template = constants.%assoc0.a1d]
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT:
  184. // CHECK:STDOUT: !members:
  185. // CHECK:STDOUT: .Self = %Self
  186. // CHECK:STDOUT: .V = @V.%assoc0
  187. // CHECK:STDOUT: witness = (%V)
  188. // CHECK:STDOUT: }
  189. // CHECK:STDOUT:
  190. // CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) {
  191. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
  192. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)]
  193. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @V.%Self.as_type (%Self.as_type.b70) [symbolic = %require_complete (constants.%require_complete.9b1)]
  194. // CHECK:STDOUT:
  195. // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70);
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT:
  198. // CHECK:STDOUT: impl @impl.1: %.loc8_7.2 as %.loc8_14 {
  199. // CHECK:STDOUT: !members:
  200. // CHECK:STDOUT: witness = file.%impl_witness.loc8
  201. // CHECK:STDOUT: }
  202. // CHECK:STDOUT:
  203. // CHECK:STDOUT: impl @impl.45: %i32 as %.loc10_15 {
  204. // CHECK:STDOUT: !members:
  205. // CHECK:STDOUT: witness = file.%impl_witness.loc10
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT:
  208. // CHECK:STDOUT: specific @V(constants.%Self.826) {
  209. // CHECK:STDOUT: %Self => constants.%Self.826
  210. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70
  211. // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1
  212. // CHECK:STDOUT: }
  213. // CHECK:STDOUT:
  214. // CHECK:STDOUT: specific @V(constants.%I.facet.1f7) {
  215. // CHECK:STDOUT: %Self => constants.%I.facet.1f7
  216. // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type
  217. // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c
  218. // CHECK:STDOUT: }
  219. // CHECK:STDOUT:
  220. // CHECK:STDOUT: specific @V(constants.%I.facet.27e) {
  221. // CHECK:STDOUT: %Self => constants.%I.facet.27e
  222. // CHECK:STDOUT: %Self.as_type => constants.%empty_struct_type
  223. // CHECK:STDOUT: %require_complete => constants.%complete_type.357
  224. // CHECK:STDOUT: }
  225. // CHECK:STDOUT:
  226. // CHECK:STDOUT: specific @V(constants.%I.facet.401) {
  227. // CHECK:STDOUT: %Self => constants.%I.facet.401
  228. // CHECK:STDOUT: %Self.as_type => constants.%i32
  229. // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT:
  232. // CHECK:STDOUT: --- fail_assoc_const_mismatch.carbon
  233. // CHECK:STDOUT:
  234. // CHECK:STDOUT: constants {
  235. // CHECK:STDOUT: %I.type: type = facet_type <@I> [template]
  236. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  237. // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
  238. // CHECK:STDOUT: %require_complete.9b1: <witness> = require_complete_type %Self.as_type.b70 [symbolic]
  239. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [template]
  240. // CHECK:STDOUT: %assoc0.a1d: %I.assoc_type = assoc_entity element0, @I.%V [template]
  241. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
  242. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic]
  243. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic]
  244. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self [symbolic]
  245. // CHECK:STDOUT: %I.facet.1f7: %I.type = facet_value %.Self.as_type, %.Self.as_wit [symbolic]
  246. // CHECK:STDOUT: %require_complete.d0c: <witness> = require_complete_type %.Self.as_type [symbolic]
  247. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic]
  248. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template]
  249. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %int_0> [template]
  250. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (<error>) [template]
  251. // CHECK:STDOUT: %I.facet.c20: %I.type = facet_value %empty_struct_type, %impl_witness [template]
  252. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
  253. // CHECK:STDOUT: }
  254. // CHECK:STDOUT:
  255. // CHECK:STDOUT: imports {
  256. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  257. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  258. // CHECK:STDOUT: import Core//prelude
  259. // CHECK:STDOUT: import Core//prelude/...
  260. // CHECK:STDOUT: }
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: file {
  264. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  265. // CHECK:STDOUT: .Core = imports.%Core
  266. // CHECK:STDOUT: .I = %I.decl
  267. // CHECK:STDOUT: }
  268. // CHECK:STDOUT: %Core.import = import Core
  269. // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {}
  270. // CHECK:STDOUT: impl_decl @impl [template] {} {
  271. // CHECK:STDOUT: %.loc15_7.1: %empty_struct_type = struct_literal ()
  272. // CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
  273. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
  274. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self]
  275. // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self]
  276. // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [template = constants.%assoc0.a1d]
  277. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type]
  278. // CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type]
  279. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit]
  280. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0]
  281. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0]
  282. // CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [template = constants.%I_where.type] {
  283. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %int_0
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (<error>) [template = constants.%impl_witness]
  287. // CHECK:STDOUT: %.loc15: %empty_struct_type = converted constants.%int_0, <error> [template = <error>]
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: interface @I {
  291. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  292. // CHECK:STDOUT: %V: @V.%Self.as_type (%Self.as_type.b70) = assoc_const_decl @V [template] {
  293. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [template = constants.%assoc0.a1d]
  294. // CHECK:STDOUT: }
  295. // CHECK:STDOUT:
  296. // CHECK:STDOUT: !members:
  297. // CHECK:STDOUT: .Self = %Self
  298. // CHECK:STDOUT: .V = @V.%assoc0
  299. // CHECK:STDOUT: witness = (%V)
  300. // CHECK:STDOUT: }
  301. // CHECK:STDOUT:
  302. // CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) {
  303. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
  304. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)]
  305. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @V.%Self.as_type (%Self.as_type.b70) [symbolic = %require_complete (constants.%require_complete.9b1)]
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70);
  308. // CHECK:STDOUT: }
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: impl @impl: %.loc15_7.2 as %.loc15_14 {
  311. // CHECK:STDOUT: !members:
  312. // CHECK:STDOUT: witness = file.%impl_witness
  313. // CHECK:STDOUT: }
  314. // CHECK:STDOUT:
  315. // CHECK:STDOUT: specific @V(constants.%Self.826) {
  316. // CHECK:STDOUT: %Self => constants.%Self.826
  317. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70
  318. // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1
  319. // CHECK:STDOUT: }
  320. // CHECK:STDOUT:
  321. // CHECK:STDOUT: specific @V(constants.%I.facet.1f7) {
  322. // CHECK:STDOUT: %Self => constants.%I.facet.1f7
  323. // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type
  324. // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c
  325. // CHECK:STDOUT: }
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: specific @V(constants.%I.facet.c20) {
  328. // CHECK:STDOUT: %Self => constants.%I.facet.c20
  329. // CHECK:STDOUT: %Self.as_type => constants.%empty_struct_type
  330. // CHECK:STDOUT: %require_complete => constants.%complete_type
  331. // CHECK:STDOUT: }
  332. // CHECK:STDOUT:
  333. // CHECK:STDOUT: --- fail_assoc_const_not_constant_after_conversion.carbon
  334. // CHECK:STDOUT:
  335. // CHECK:STDOUT: constants {
  336. // CHECK:STDOUT: %I.type: type = facet_type <@I> [template]
  337. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  338. // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
  339. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
  340. // CHECK:STDOUT: %require_complete.9b1: <witness> = require_complete_type %Self.as_type.b70 [symbolic]
  341. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [template]
  342. // CHECK:STDOUT: %assoc0.a1d: %I.assoc_type = assoc_entity element0, @I.%V [template]
  343. // CHECK:STDOUT: %C: type = class_type @C [template]
  344. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
  345. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template]
  346. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [template]
  347. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [template]
  348. // CHECK:STDOUT: %ImplicitAs.type.15e: type = facet_type <@ImplicitAs, @ImplicitAs(%C)> [template]
  349. // CHECK:STDOUT: %Convert.type.56d: type = fn_type @Convert.1, @ImplicitAs(%C) [template]
  350. // CHECK:STDOUT: %impl_witness.3db: <witness> = impl_witness (@impl.1.%Convert.decl) [template]
  351. // CHECK:STDOUT: %Convert.type.721: type = fn_type @Convert.2 [template]
  352. // CHECK:STDOUT: %Convert.155: %Convert.type.721 = struct_value () [template]
  353. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.15e = facet_value %empty_tuple.type, %impl_witness.3db [template]
  354. // CHECK:STDOUT: %C.val: %C = struct_value () [template]
  355. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic]
  356. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic]
  357. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self [symbolic]
  358. // CHECK:STDOUT: %I.facet.1f7: %I.type = facet_value %.Self.as_type, %.Self.as_wit [symbolic]
  359. // CHECK:STDOUT: %require_complete.d0c: <witness> = require_complete_type %.Self.as_type [symbolic]
  360. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic]
  361. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
  362. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple> [template]
  363. // CHECK:STDOUT: %impl_witness.85b: <witness> = impl_witness (<error>) [template]
  364. // CHECK:STDOUT: %I.facet.b45: %I.type = facet_value %C, %impl_witness.85b [template]
  365. // CHECK:STDOUT: %.d4d: type = fn_type_with_self_type %Convert.type.56d, %ImplicitAs.facet [template]
  366. // CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %empty_tuple, %Convert.155 [template]
  367. // CHECK:STDOUT: }
  368. // CHECK:STDOUT:
  369. // CHECK:STDOUT: imports {
  370. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  371. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  372. // CHECK:STDOUT: import Core//prelude
  373. // CHECK:STDOUT: import Core//prelude/...
  374. // CHECK:STDOUT: }
  375. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [template = constants.%ImplicitAs.generic]
  376. // CHECK:STDOUT: }
  377. // CHECK:STDOUT:
  378. // CHECK:STDOUT: file {
  379. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  380. // CHECK:STDOUT: .Core = imports.%Core
  381. // CHECK:STDOUT: .I = %I.decl
  382. // CHECK:STDOUT: .C = %C.decl
  383. // CHECK:STDOUT: }
  384. // CHECK:STDOUT: %Core.import = import Core
  385. // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {}
  386. // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
  387. // CHECK:STDOUT: impl_decl @impl.1 [template] {} {
  388. // CHECK:STDOUT: %.loc10_7.1: %empty_tuple.type = tuple_literal ()
  389. // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
  390. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  391. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.cc7 = name_ref ImplicitAs, imports.%Core.ImplicitAs [template = constants.%ImplicitAs.generic]
  392. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
  393. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%C)> [template = constants.%ImplicitAs.type.15e]
  394. // CHECK:STDOUT: }
  395. // CHECK:STDOUT: %impl_witness.loc10: <witness> = impl_witness (@impl.1.%Convert.decl) [template = constants.%impl_witness.3db]
  396. // CHECK:STDOUT: impl_decl @impl.2 [template] {} {
  397. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
  398. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
  399. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self]
  400. // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self]
  401. // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [template = constants.%assoc0.a1d]
  402. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type]
  403. // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type]
  404. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit]
  405. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0]
  406. // CHECK:STDOUT: %.loc18_25.1: %empty_tuple.type = tuple_literal ()
  407. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple]
  408. // CHECK:STDOUT: %.loc18_25.2: %empty_tuple.type = converted %.loc18_25.1, %empty_tuple [template = constants.%empty_tuple]
  409. // CHECK:STDOUT: %.loc18_13: type = where_expr %.Self [template = constants.%I_where.type] {
  410. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc18_25.2
  411. // CHECK:STDOUT: }
  412. // CHECK:STDOUT: }
  413. // CHECK:STDOUT: %impl_witness.loc18: <witness> = impl_witness (<error>) [template = constants.%impl_witness.85b]
  414. // CHECK:STDOUT: %impl.elem0: %.d4d = impl_witness_access constants.%impl_witness.3db, element0 [template = constants.%Convert.155]
  415. // CHECK:STDOUT: %bound_method: <bound method> = bound_method constants.%empty_tuple, %impl.elem0 [template = constants.%Convert.bound]
  416. // CHECK:STDOUT: %.loc18_13.1: ref %C = temporary_storage
  417. // CHECK:STDOUT: %Convert.call: init %C = call %bound_method(constants.%empty_tuple) to %.loc18_13.1
  418. // CHECK:STDOUT: %.loc18_13.2: init %C = converted constants.%empty_tuple, %Convert.call
  419. // CHECK:STDOUT: %.loc18_13.3: ref %C = temporary %.loc18_13.1, %.loc18_13.2
  420. // CHECK:STDOUT: %.loc18_13.4: %C = bind_value %.loc18_13.3
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: interface @I {
  424. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  425. // CHECK:STDOUT: %V: @V.%Self.as_type (%Self.as_type.b70) = assoc_const_decl @V [template] {
  426. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [template = constants.%assoc0.a1d]
  427. // CHECK:STDOUT: }
  428. // CHECK:STDOUT:
  429. // CHECK:STDOUT: !members:
  430. // CHECK:STDOUT: .Self = %Self
  431. // CHECK:STDOUT: .V = @V.%assoc0
  432. // CHECK:STDOUT: witness = (%V)
  433. // CHECK:STDOUT: }
  434. // CHECK:STDOUT:
  435. // CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) {
  436. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
  437. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)]
  438. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @V.%Self.as_type (%Self.as_type.b70) [symbolic = %require_complete (constants.%require_complete.9b1)]
  439. // CHECK:STDOUT:
  440. // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70);
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: impl @impl.1: %.loc10_7.2 as %ImplicitAs.type {
  444. // CHECK:STDOUT: %Convert.decl: %Convert.type.721 = fn_decl @Convert.2 [template = constants.%Convert.155] {
  445. // CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self
  446. // CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0
  447. // CHECK:STDOUT: %return.patt: %C = return_slot_pattern
  448. // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1
  449. // CHECK:STDOUT: } {
  450. // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C]
  451. // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0
  452. // CHECK:STDOUT: %.loc11_21.1: type = splice_block %.loc11_21.3 [template = constants.%empty_tuple.type] {
  453. // CHECK:STDOUT: %.loc11_21.2: %empty_tuple.type = tuple_literal ()
  454. // CHECK:STDOUT: %.loc11_21.3: type = converted %.loc11_21.2, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
  455. // CHECK:STDOUT: }
  456. // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
  457. // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1
  458. // CHECK:STDOUT: %return: ref %C = return_slot %return.param
  459. // CHECK:STDOUT: }
  460. // CHECK:STDOUT:
  461. // CHECK:STDOUT: !members:
  462. // CHECK:STDOUT: .Convert = %Convert.decl
  463. // CHECK:STDOUT: witness = file.%impl_witness.loc10
  464. // CHECK:STDOUT: }
  465. // CHECK:STDOUT:
  466. // CHECK:STDOUT: impl @impl.2: %C.ref as %.loc18_13 {
  467. // CHECK:STDOUT: !members:
  468. // CHECK:STDOUT: witness = file.%impl_witness.loc18
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: class @C {
  472. // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [template = constants.%complete_type]
  473. // CHECK:STDOUT: complete_type_witness = %complete_type
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: !members:
  476. // CHECK:STDOUT: .Self = constants.%C
  477. // CHECK:STDOUT: }
  478. // CHECK:STDOUT:
  479. // CHECK:STDOUT: fn @Convert.2[%self.param_patt: %empty_tuple.type]() -> %return.param_patt: %C {
  480. // CHECK:STDOUT: !entry:
  481. // CHECK:STDOUT: %.loc11_41.1: %empty_struct_type = struct_literal ()
  482. // CHECK:STDOUT: %.loc11_41.2: init %C = class_init (), %return [template = constants.%C.val]
  483. // CHECK:STDOUT: %.loc11_42: init %C = converted %.loc11_41.1, %.loc11_41.2 [template = constants.%C.val]
  484. // CHECK:STDOUT: return %.loc11_42 to %return
  485. // CHECK:STDOUT: }
  486. // CHECK:STDOUT:
  487. // CHECK:STDOUT: specific @V(constants.%Self.826) {
  488. // CHECK:STDOUT: %Self => constants.%Self.826
  489. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70
  490. // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1
  491. // CHECK:STDOUT: }
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: specific @V(constants.%I.facet.1f7) {
  494. // CHECK:STDOUT: %Self => constants.%I.facet.1f7
  495. // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type
  496. // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c
  497. // CHECK:STDOUT: }
  498. // CHECK:STDOUT:
  499. // CHECK:STDOUT: specific @V(constants.%I.facet.b45) {
  500. // CHECK:STDOUT: %Self => constants.%I.facet.b45
  501. // CHECK:STDOUT: %Self.as_type => constants.%C
  502. // CHECK:STDOUT: %require_complete => constants.%complete_type
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: --- fail_monomorphization_failure.carbon
  506. // CHECK:STDOUT:
  507. // CHECK:STDOUT: constants {
  508. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template]
  509. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
  510. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template]
  511. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  512. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  513. // CHECK:STDOUT: %I.type.dac: type = generic_interface_type @I [template]
  514. // CHECK:STDOUT: %I.generic: %I.type.dac = struct_value () [template]
  515. // CHECK:STDOUT: %I.type.8a1: type = facet_type <@I, @I(%N)> [symbolic]
  516. // CHECK:STDOUT: %Self.3a0: %I.type.8a1 = bind_symbolic_name Self, 1 [symbolic]
  517. // CHECK:STDOUT: %Self.as_type.72b: type = facet_access_type %Self.3a0 [symbolic]
  518. // CHECK:STDOUT: %array_type: type = array_type %N, %Self.as_type.72b [symbolic]
  519. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %array_type [symbolic]
  520. // CHECK:STDOUT: %I.assoc_type.656: type = assoc_entity_type %I.type.8a1 [symbolic]
  521. // CHECK:STDOUT: %assoc0.6db: %I.assoc_type.656 = assoc_entity element0, @I.%V [symbolic]
  522. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
  523. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template]
  524. // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [template]
  525. // CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%Core.import_ref.c15) [template]
  526. // CHECK:STDOUT: %Op.type.e42: type = fn_type @Op.1 [template]
  527. // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, %impl_witness [template]
  528. // CHECK:STDOUT: %.45d: type = fn_type_with_self_type %Op.type.e42, %Negate.facet [template]
  529. // CHECK:STDOUT: %Op.type.1be: type = fn_type @Op.2 [template]
  530. // CHECK:STDOUT: %Op.bba: %Op.type.1be = struct_value () [template]
  531. // CHECK:STDOUT: %Op.bound: <bound method> = bound_method %int_1, %Op.bba [template]
  532. // CHECK:STDOUT: %int_-1: Core.IntLiteral = int_value -1 [template]
  533. // CHECK:STDOUT: %I.type.057: type = facet_type <@I, @I(%int_-1)> [template]
  534. // CHECK:STDOUT: %.Self: %I.type.057 = bind_symbolic_name .Self [symbolic]
  535. // CHECK:STDOUT: %I.assoc_type.3f5: type = assoc_entity_type %I.type.057 [template]
  536. // CHECK:STDOUT: %assoc0.34f: %I.assoc_type.3f5 = assoc_entity element0, @I.%V [template]
  537. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic]
  538. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self [symbolic]
  539. // CHECK:STDOUT: %I.facet: %I.type.057 = facet_value %.Self.as_type, %.Self.as_wit [symbolic]
  540. // CHECK:STDOUT: %impl.elem0: <error> = impl_witness_access %.Self.as_wit, element0 [symbolic]
  541. // CHECK:STDOUT: }
  542. // CHECK:STDOUT:
  543. // CHECK:STDOUT: imports {
  544. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  545. // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral
  546. // CHECK:STDOUT: .Negate = %Core.Negate
  547. // CHECK:STDOUT: import Core//prelude
  548. // CHECK:STDOUT: import Core//prelude/...
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral]
  551. // CHECK:STDOUT: }
  552. // CHECK:STDOUT:
  553. // CHECK:STDOUT: file {
  554. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  555. // CHECK:STDOUT: .Core = imports.%Core
  556. // CHECK:STDOUT: .I = %I.decl
  557. // CHECK:STDOUT: }
  558. // CHECK:STDOUT: %Core.import = import Core
  559. // CHECK:STDOUT: %I.decl: %I.type.dac = interface_decl @I [template = constants.%I.generic] {
  560. // CHECK:STDOUT: %N.patt.loc4_13.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_13.2 (constants.%N.patt)]
  561. // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_13.1, runtime_param<none> [symbolic = %N.patt.loc4_13.2 (constants.%N.patt)]
  562. // CHECK:STDOUT: } {
  563. // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param<none>
  564. // CHECK:STDOUT: %.loc4_33.1: type = splice_block %.loc4_33.3 [template = Core.IntLiteral] {
  565. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  566. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%Core.IntLiteral [template = constants.%IntLiteral]
  567. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
  568. // CHECK:STDOUT: %.loc4_33.2: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
  569. // CHECK:STDOUT: %.loc4_33.3: type = converted %int_literal.make_type, %.loc4_33.2 [template = Core.IntLiteral]
  570. // CHECK:STDOUT: }
  571. // CHECK:STDOUT: %N.loc4_13.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_13.2 (constants.%N)]
  572. // CHECK:STDOUT: }
  573. // CHECK:STDOUT: impl_decl @impl.7 [template] {} {
  574. // CHECK:STDOUT: %.loc15_7.1: %empty_struct_type = struct_literal ()
  575. // CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
  576. // CHECK:STDOUT: %I.ref: %I.type.dac = name_ref I, file.%I.decl [template = constants.%I.generic]
  577. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1]
  578. // CHECK:STDOUT: %impl.elem0.loc15_14: %.45d = impl_witness_access constants.%impl_witness, element0 [template = constants.%Op.bba]
  579. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_1, %impl.elem0.loc15_14 [template = constants.%Op.bound]
  580. // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %bound_method(%int_1) [template = constants.%int_-1]
  581. // CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = value_of_initializer %int.snegate [template = constants.%int_-1]
  582. // CHECK:STDOUT: %.loc15_16.2: Core.IntLiteral = converted %int.snegate, %.loc15_16.1 [template = constants.%int_-1]
  583. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%int_-1)> [template = constants.%I.type.057]
  584. // CHECK:STDOUT: %.Self: %I.type.057 = bind_symbolic_name .Self [symbolic = constants.%.Self]
  585. // CHECK:STDOUT: %.Self.ref: %I.type.057 = name_ref .Self, %.Self [symbolic = constants.%.Self]
  586. // CHECK:STDOUT: %.loc15_24.1: %I.assoc_type.3f5 = specific_constant @V.%assoc0, @I(constants.%int_-1) [template = constants.%assoc0.34f]
  587. // CHECK:STDOUT: %V.ref: %I.assoc_type.3f5 = name_ref V, %.loc15_24.1 [template = constants.%assoc0.34f]
  588. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type]
  589. // CHECK:STDOUT: %.loc15_24.2: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type]
  590. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit]
  591. // CHECK:STDOUT: %impl.elem0.loc15_24: <error> = impl_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0]
  592. // CHECK:STDOUT: %.loc15_30: %empty_tuple.type = tuple_literal ()
  593. // CHECK:STDOUT: %.loc15_18: type = where_expr %.Self [template = <error>] {
  594. // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc15_24, <error>
  595. // CHECK:STDOUT: }
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT: }
  598. // CHECK:STDOUT:
  599. // CHECK:STDOUT: generic interface @I(%N.loc4_13.1: Core.IntLiteral) {
  600. // CHECK:STDOUT: %N.loc4_13.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_13.2 (constants.%N)]
  601. // CHECK:STDOUT: %N.patt.loc4_13.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_13.2 (constants.%N.patt)]
  602. // CHECK:STDOUT:
  603. // CHECK:STDOUT: !definition:
  604. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N.loc4_13.2)> [symbolic = %I.type (constants.%I.type.8a1)]
  605. // CHECK:STDOUT: %Self.2: %I.type.8a1 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3a0)]
  606. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I.%I.type (%I.type.8a1) [symbolic = %I.assoc_type (constants.%I.assoc_type.656)]
  607. // CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.656) = assoc_entity element0, %V [symbolic = %assoc0 (constants.%assoc0.6db)]
  608. // CHECK:STDOUT:
  609. // CHECK:STDOUT: interface {
  610. // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.8a1) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3a0)]
  611. // CHECK:STDOUT: %V: @V.%array_type (%array_type) = assoc_const_decl @V [template] {
  612. // CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.656) = assoc_entity element0, @I.%V [symbolic = @I.%assoc0 (constants.%assoc0.6db)]
  613. // CHECK:STDOUT: }
  614. // CHECK:STDOUT:
  615. // CHECK:STDOUT: !members:
  616. // CHECK:STDOUT: .Self = %Self.1
  617. // CHECK:STDOUT: .V = @V.%assoc0
  618. // CHECK:STDOUT: witness = (%V)
  619. // CHECK:STDOUT: }
  620. // CHECK:STDOUT: }
  621. // CHECK:STDOUT:
  622. // CHECK:STDOUT: generic assoc_const @V(@I.%N.loc4_13.1: Core.IntLiteral, @I.%Self.1: @I.%I.type (%I.type.8a1)) {
  623. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N (constants.%N)]
  624. // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N)> [symbolic = %I.type (constants.%I.type.8a1)]
  625. // CHECK:STDOUT: %Self: %I.type.8a1 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3a0)]
  626. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.72b)]
  627. // CHECK:STDOUT: %array_type: type = array_type %N, @V.%Self.as_type (%Self.as_type.72b) [symbolic = %array_type (constants.%array_type)]
  628. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @V.%array_type (%array_type) [symbolic = %require_complete (constants.%require_complete)]
  629. // CHECK:STDOUT:
  630. // CHECK:STDOUT: assoc_const V:! @V.%array_type (%array_type);
  631. // CHECK:STDOUT: }
  632. // CHECK:STDOUT:
  633. // CHECK:STDOUT: impl @impl.7: %.loc15_7.2 as %.loc15_18 {
  634. // CHECK:STDOUT: !members:
  635. // CHECK:STDOUT: witness = <error>
  636. // CHECK:STDOUT: }
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: specific @I(constants.%N) {
  639. // CHECK:STDOUT: %N.loc4_13.2 => constants.%N
  640. // CHECK:STDOUT: %N.patt.loc4_13.2 => constants.%N
  641. // CHECK:STDOUT: }
  642. // CHECK:STDOUT:
  643. // CHECK:STDOUT: specific @V(constants.%N, constants.%Self.3a0) {
  644. // CHECK:STDOUT: %N => constants.%N
  645. // CHECK:STDOUT: %I.type => constants.%I.type.8a1
  646. // CHECK:STDOUT: %Self => constants.%Self.3a0
  647. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.72b
  648. // CHECK:STDOUT: %array_type => constants.%array_type
  649. // CHECK:STDOUT: %require_complete => constants.%require_complete
  650. // CHECK:STDOUT: }
  651. // CHECK:STDOUT:
  652. // CHECK:STDOUT: specific @I(@V.%N) {}
  653. // CHECK:STDOUT:
  654. // CHECK:STDOUT: specific @I(%N.loc4_13.2) {}
  655. // CHECK:STDOUT:
  656. // CHECK:STDOUT: specific @I(constants.%int_-1) {
  657. // CHECK:STDOUT: %N.loc4_13.2 => constants.%int_-1
  658. // CHECK:STDOUT: %N.patt.loc4_13.2 => constants.%int_-1
  659. // CHECK:STDOUT:
  660. // CHECK:STDOUT: !definition:
  661. // CHECK:STDOUT: %I.type => constants.%I.type.057
  662. // CHECK:STDOUT: %Self.2 => constants.%Self.3a0
  663. // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.3f5
  664. // CHECK:STDOUT: %assoc0 => constants.%assoc0.34f
  665. // CHECK:STDOUT: }
  666. // CHECK:STDOUT:
  667. // CHECK:STDOUT: specific @V(constants.%int_-1, constants.%I.facet) {
  668. // CHECK:STDOUT: %N => constants.%int_-1
  669. // CHECK:STDOUT: %I.type => constants.%I.type.057
  670. // CHECK:STDOUT: %Self => constants.%I.facet
  671. // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type
  672. // CHECK:STDOUT: %array_type => <error>
  673. // CHECK:STDOUT: %require_complete => <error>
  674. // CHECK:STDOUT: }
  675. // CHECK:STDOUT:
  676. // CHECK:STDOUT: --- fail_todo_constrained_fn.carbon
  677. // CHECK:STDOUT:
  678. // CHECK:STDOUT: constants {
  679. // CHECK:STDOUT: %I.type: type = facet_type <@I> [template]
  680. // CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
  681. // CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
  682. // CHECK:STDOUT: %require_complete.9b1: <witness> = require_complete_type %Self.as_type.b70 [symbolic]
  683. // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [template]
  684. // CHECK:STDOUT: %assoc0.a1d: %I.assoc_type = assoc_entity element0, @I.%V [template]
  685. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic]
  686. // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template]
  687. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [template]
  688. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [template]
  689. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic]
  690. // CHECK:STDOUT: %ImplicitAs.type.2a8: type = facet_type <@ImplicitAs, @ImplicitAs(%.Self.as_type)> [symbolic]
  691. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self [symbolic]
  692. // CHECK:STDOUT: %I.facet: %I.type = facet_value %.Self.as_type, %.Self.as_wit [symbolic]
  693. // CHECK:STDOUT: %require_complete.d0c: <witness> = require_complete_type %.Self.as_type [symbolic]
  694. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic]
  695. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template]
  696. // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct and TODO> [template]
  697. // CHECK:STDOUT: %T: %I_where.type = bind_symbolic_name T, 0 [symbolic]
  698. // CHECK:STDOUT: %T.patt: %I_where.type = symbolic_binding_pattern T, 0 [symbolic]
  699. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  700. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  701. // CHECK:STDOUT: %CallF.type: type = fn_type @CallF [template]
  702. // CHECK:STDOUT: %CallF: %CallF.type = struct_value () [template]
  703. // CHECK:STDOUT: }
  704. // CHECK:STDOUT:
  705. // CHECK:STDOUT: imports {
  706. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  707. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  708. // CHECK:STDOUT: import Core//prelude
  709. // CHECK:STDOUT: import Core//prelude/...
  710. // CHECK:STDOUT: }
  711. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [template = constants.%ImplicitAs.generic]
  712. // CHECK:STDOUT: }
  713. // CHECK:STDOUT:
  714. // CHECK:STDOUT: file {
  715. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  716. // CHECK:STDOUT: .Core = imports.%Core
  717. // CHECK:STDOUT: .I = %I.decl
  718. // CHECK:STDOUT: .F = %F.decl
  719. // CHECK:STDOUT: .CallF = %CallF.decl
  720. // CHECK:STDOUT: }
  721. // CHECK:STDOUT: %Core.import = import Core
  722. // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {}
  723. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
  724. // CHECK:STDOUT: %T.patt.loc8_6.1: %I_where.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)]
  725. // CHECK:STDOUT: %T.param_patt: %I_where.type = value_param_pattern %T.patt.loc8_6.1, runtime_param<none> [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)]
  726. // CHECK:STDOUT: } {
  727. // CHECK:STDOUT: %T.param: %I_where.type = value_param runtime_param<none>
  728. // CHECK:STDOUT: %.loc8_12.1: type = splice_block %.loc8_12.2 [template = constants.%I_where.type] {
  729. // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
  730. // CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self]
  731. // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal ()
  732. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  733. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.cc7 = name_ref ImplicitAs, imports.%Core.ImplicitAs [template = constants.%ImplicitAs.generic]
  734. // CHECK:STDOUT: %.Self.ref.loc8_43: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self]
  735. // CHECK:STDOUT: %.Self.as_type.loc8_48: type = facet_access_type %.Self.ref.loc8_43 [symbolic = constants.%.Self.as_type]
  736. // CHECK:STDOUT: %.loc8_48: type = converted %.Self.ref.loc8_43, %.Self.as_type.loc8_48 [symbolic = constants.%.Self.as_type]
  737. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%.Self.as_type)> [symbolic = constants.%ImplicitAs.type.2a8]
  738. // CHECK:STDOUT: %.loc8_19.2: type = converted %.loc8_19.1, constants.%empty_struct_type [template = constants.%empty_struct_type]
  739. // CHECK:STDOUT: %.Self.ref.loc8_54: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self]
  740. // CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [template = constants.%assoc0.a1d]
  741. // CHECK:STDOUT: %.Self.as_type.loc8_54: type = facet_access_type %.Self.ref.loc8_54 [symbolic = constants.%.Self.as_type]
  742. // CHECK:STDOUT: %.loc8_54: type = converted %.Self.ref.loc8_54, %.Self.as_type.loc8_54 [symbolic = constants.%.Self.as_type]
  743. // CHECK:STDOUT: %.Self.as_wit: <witness> = facet_access_witness %.Self.ref.loc8_54 [symbolic = constants.%.Self.as_wit]
  744. // CHECK:STDOUT: %impl.elem0: %.Self.as_type = impl_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0]
  745. // CHECK:STDOUT: %.loc8_60.1: %empty_struct_type = struct_literal ()
  746. // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [template = constants.%empty_struct]
  747. // CHECK:STDOUT: %.loc8_60.2: %empty_struct_type = converted %.loc8_60.1, %empty_struct [template = constants.%empty_struct]
  748. // CHECK:STDOUT: %.loc8_12.2: type = where_expr %.Self [template = constants.%I_where.type] {
  749. // CHECK:STDOUT: requirement_impls %.loc8_19.2, %ImplicitAs.type
  750. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_60.2
  751. // CHECK:STDOUT: }
  752. // CHECK:STDOUT: }
  753. // CHECK:STDOUT: %T.loc8_6.1: %I_where.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_6.2 (constants.%T)]
  754. // CHECK:STDOUT: }
  755. // CHECK:STDOUT: %CallF.decl: %CallF.type = fn_decl @CallF [template = constants.%CallF] {} {}
  756. // CHECK:STDOUT: }
  757. // CHECK:STDOUT:
  758. // CHECK:STDOUT: interface @I {
  759. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
  760. // CHECK:STDOUT: %V: @V.%Self.as_type (%Self.as_type.b70) = assoc_const_decl @V [template] {
  761. // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [template = constants.%assoc0.a1d]
  762. // CHECK:STDOUT: }
  763. // CHECK:STDOUT:
  764. // CHECK:STDOUT: !members:
  765. // CHECK:STDOUT: .Self = %Self
  766. // CHECK:STDOUT: .V = @V.%assoc0
  767. // CHECK:STDOUT: witness = (%V)
  768. // CHECK:STDOUT: }
  769. // CHECK:STDOUT:
  770. // CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) {
  771. // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
  772. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.b70)]
  773. // CHECK:STDOUT: %require_complete: <witness> = require_complete_type @V.%Self.as_type (%Self.as_type.b70) [symbolic = %require_complete (constants.%require_complete.9b1)]
  774. // CHECK:STDOUT:
  775. // CHECK:STDOUT: assoc_const V:! @V.%Self.as_type (%Self.as_type.b70);
  776. // CHECK:STDOUT: }
  777. // CHECK:STDOUT:
  778. // CHECK:STDOUT: generic fn @F(%T.loc8_6.1: %I_where.type) {
  779. // CHECK:STDOUT: %T.loc8_6.2: %I_where.type = bind_symbolic_name T, 0 [symbolic = %T.loc8_6.2 (constants.%T)]
  780. // CHECK:STDOUT: %T.patt.loc8_6.2: %I_where.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)]
  781. // CHECK:STDOUT:
  782. // CHECK:STDOUT: fn(%T.param_patt: %I_where.type);
  783. // CHECK:STDOUT: }
  784. // CHECK:STDOUT:
  785. // CHECK:STDOUT: fn @CallF() {
  786. // CHECK:STDOUT: !entry:
  787. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
  788. // CHECK:STDOUT: %.loc22_6: %empty_struct_type = struct_literal ()
  789. // CHECK:STDOUT: %.loc22_7: %I_where.type = converted %.loc22_6, <error> [template = <error>]
  790. // CHECK:STDOUT: return
  791. // CHECK:STDOUT: }
  792. // CHECK:STDOUT:
  793. // CHECK:STDOUT: specific @V(constants.%Self.826) {
  794. // CHECK:STDOUT: %Self => constants.%Self.826
  795. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.b70
  796. // CHECK:STDOUT: %require_complete => constants.%require_complete.9b1
  797. // CHECK:STDOUT: }
  798. // CHECK:STDOUT:
  799. // CHECK:STDOUT: specific @V(constants.%I.facet) {
  800. // CHECK:STDOUT: %Self => constants.%I.facet
  801. // CHECK:STDOUT: %Self.as_type => constants.%.Self.as_type
  802. // CHECK:STDOUT: %require_complete => constants.%require_complete.d0c
  803. // CHECK:STDOUT: }
  804. // CHECK:STDOUT:
  805. // CHECK:STDOUT: specific @F(constants.%T) {
  806. // CHECK:STDOUT: %T.loc8_6.2 => constants.%T
  807. // CHECK:STDOUT: %T.patt.loc8_6.2 => constants.%T
  808. // CHECK:STDOUT: }
  809. // CHECK:STDOUT: