require.carbon 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/named_constraint/require.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/named_constraint/require.carbon
  12. // --- fail_todo_extend.carbon
  13. library "[[@TEST_NAME]]";
  14. interface Y {
  15. fn YY();
  16. }
  17. //@dump-sem-ir-begin
  18. constraint Z {
  19. extend require impls Y;
  20. }
  21. //@dump-sem-ir-end
  22. fn F(T:! Z) {
  23. // CHECK:STDERR: fail_todo_extend.carbon:[[@LINE+4]]:3: error: member name `YY` not found [MemberNameNotFound]
  24. // CHECK:STDERR: T.YY();
  25. // CHECK:STDERR: ^~~~
  26. // CHECK:STDERR:
  27. T.YY();
  28. T.(Y.YY)();
  29. }
  30. // --- implicit_self_impls.carbon
  31. library "[[@TEST_NAME]]";
  32. interface Y {
  33. fn YY();
  34. }
  35. //@dump-sem-ir-begin
  36. constraint Z {
  37. require impls Y;
  38. }
  39. //@dump-sem-ir-end
  40. fn F(T:! Z) {
  41. T.(Y.YY)();
  42. }
  43. // --- explicit_self_impls.carbon
  44. library "[[@TEST_NAME]]";
  45. interface Y {
  46. fn YY();
  47. }
  48. //@dump-sem-ir-begin
  49. constraint Z {
  50. require Self impls Y;
  51. }
  52. //@dump-sem-ir-end
  53. fn F(T:! Z) {
  54. T.(Y.YY)();
  55. }
  56. // --- fail_implicit_self_no_extend_name_lookup_fails.carbon
  57. library "[[@TEST_NAME]]";
  58. interface Y {
  59. fn YY();
  60. }
  61. constraint Z {
  62. require impls Y;
  63. }
  64. fn F(T:! Z) {
  65. // This should fail name lookup since Z does not extend Y.
  66. //
  67. // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found [MemberNameNotFound]
  68. // CHECK:STDERR: T.YY();
  69. // CHECK:STDERR: ^~~~
  70. // CHECK:STDERR:
  71. T.YY();
  72. }
  73. // --- fail_explicit_self_no_extend_name_lookup_fails.carbon
  74. library "[[@TEST_NAME]]";
  75. interface Y {
  76. fn YY();
  77. }
  78. constraint Z {
  79. require Self impls Y;
  80. }
  81. fn F(T:! Z) {
  82. // This should fail name lookup since Z does not extend Y.
  83. //
  84. // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found [MemberNameNotFound]
  85. // CHECK:STDERR: T.YY();
  86. // CHECK:STDERR: ^~~~
  87. // CHECK:STDERR:
  88. T.YY();
  89. }
  90. // --- explicit_self_specific_impls.carbon
  91. library "[[@TEST_NAME]]";
  92. interface Y {}
  93. class C(T:! type);
  94. //@dump-sem-ir-begin
  95. constraint Z {
  96. require C(Self) impls Y;
  97. }
  98. //@dump-sem-ir-end
  99. // --- require_impls_where.carbon
  100. library "[[@TEST_NAME]]";
  101. interface Y { let Y1:! type; }
  102. //@dump-sem-ir-begin
  103. constraint Z {
  104. require impls Y where .Y1 = ();
  105. }
  106. //@dump-sem-ir-end
  107. // --- fail_require_impls_incomplete_constraint.carbon
  108. library "[[@TEST_NAME]]";
  109. constraint Y;
  110. //@dump-sem-ir-begin
  111. constraint Z {
  112. // CHECK:STDERR: fail_require_impls_incomplete_constraint.carbon:[[@LINE+7]]:17: error: facet type `Y` cannot be identified in `require` declaration [RequireImplsUnidentifiedFacetType]
  113. // CHECK:STDERR: require impls Y;
  114. // CHECK:STDERR: ^
  115. // CHECK:STDERR: fail_require_impls_incomplete_constraint.carbon:[[@LINE-7]]:1: note: constraint was forward declared here [NamedConstraintForwardDeclaredHere]
  116. // CHECK:STDERR: constraint Y;
  117. // CHECK:STDERR: ^~~~~~~~~~~~~
  118. // CHECK:STDERR:
  119. require impls Y;
  120. }
  121. //@dump-sem-ir-end
  122. // --- fail_require_impls_incomplete_self.carbon
  123. library "[[@TEST_NAME]]";
  124. //@dump-sem-ir-begin
  125. constraint Z {
  126. // CHECK:STDERR: fail_require_impls_incomplete_self.carbon:[[@LINE+7]]:17: error: facet type `Z` cannot be identified in `require` declaration [RequireImplsUnidentifiedFacetType]
  127. // CHECK:STDERR: require impls Z;
  128. // CHECK:STDERR: ^
  129. // CHECK:STDERR: fail_require_impls_incomplete_self.carbon:[[@LINE-4]]:1: note: constraint is currently being defined [NamedConstraintIncompleteWithinDefinition]
  130. // CHECK:STDERR: constraint Z {
  131. // CHECK:STDERR: ^~~~~~~~~~~~~~
  132. // CHECK:STDERR:
  133. require impls Z;
  134. }
  135. //@dump-sem-ir-end
  136. // --- fail_require_impls_incomplete_self_specific.carbon
  137. library "[[@TEST_NAME]]";
  138. //@dump-sem-ir-begin
  139. constraint Z(T:! type) {
  140. // CHECK:STDERR: fail_require_impls_incomplete_self_specific.carbon:[[@LINE+7]]:19: error: facet type `Z(Self)` cannot be identified in `require` declaration [RequireImplsUnidentifiedFacetType]
  141. // CHECK:STDERR: require T impls Z(Self);
  142. // CHECK:STDERR: ^~~~~~~
  143. // CHECK:STDERR: fail_require_impls_incomplete_self_specific.carbon:[[@LINE-4]]:1: note: constraint is currently being defined [NamedConstraintIncompleteWithinDefinition]
  144. // CHECK:STDERR: constraint Z(T:! type) {
  145. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
  146. // CHECK:STDERR:
  147. require T impls Z(Self);
  148. }
  149. //@dump-sem-ir-end
  150. // --- fail_require_impls_without_self.carbon
  151. library "[[@TEST_NAME]]";
  152. interface Y {
  153. let Y1:! type;
  154. }
  155. //@dump-sem-ir-begin
  156. constraint Z(T:! type) {
  157. // Either the type `T` or the facet type `Y` must mention `Self` in a way that
  158. // it would appear in the type structure used for impl lookup (so inside a
  159. // `where` does not count). But they don't.
  160. //
  161. // CHECK:STDERR: fail_require_impls_without_self.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic parameter for each `interface` or `constraint` [RequireImplsMissingSelf]
  162. // CHECK:STDERR: require T impls Y where .Y1 = Self;
  163. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  164. // CHECK:STDERR:
  165. require T impls Y where .Y1 = Self;
  166. }
  167. //@dump-sem-ir-end
  168. // --- fail_require_impls_without_self_in_one_interface.carbon
  169. library "[[@TEST_NAME]]";
  170. interface Y(T:! type) {}
  171. constraint Z(T:! type) {
  172. // Self is in one interface but not the other.
  173. //
  174. // CHECK:STDERR: fail_require_impls_without_self_in_one_interface.carbon:[[@LINE+4]]:3: error: no `Self` reference found in `require` declaration; `Self` must appear in the self-type or as a generic parameter for each `interface` or `constraint` [RequireImplsMissingSelf]
  175. // CHECK:STDERR: require T impls Y(Self) & Y({});
  176. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  177. // CHECK:STDERR:
  178. require T impls Y(Self) & Y({});
  179. }
  180. // --- fail_self_impls_self.carbon
  181. library "[[@TEST_NAME]]";
  182. constraint Z(T:! type) {
  183. // CHECK:STDERR: fail_self_impls_self.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
  184. // CHECK:STDERR: require impls Self;
  185. // CHECK:STDERR: ^~~~
  186. // CHECK:STDERR:
  187. require impls Self;
  188. }
  189. // --- fail_impls_type.carbon
  190. library "[[@TEST_NAME]]";
  191. class C(T:! type) {}
  192. constraint Z(T:! type) {
  193. // CHECK:STDERR: fail_impls_type.carbon:[[@LINE+4]]:19: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
  194. // CHECK:STDERR: require T impls C(Self);
  195. // CHECK:STDERR: ^~~~~~~
  196. // CHECK:STDERR:
  197. require T impls C(Self);
  198. }
  199. // --- fail_non_type_impls.carbon
  200. library "[[@TEST_NAME]]";
  201. interface Y {}
  202. constraint Z(T:! type) {
  203. // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+7]]:11: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
  204. // CHECK:STDERR: require 1 impls Y;
  205. // CHECK:STDERR: ^
  206. // CHECK:STDERR: fail_non_type_impls.carbon:[[@LINE+4]]:11: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
  207. // CHECK:STDERR: require 1 impls Y;
  208. // CHECK:STDERR: ^
  209. // CHECK:STDERR:
  210. require 1 impls Y;
  211. }
  212. // --- fail_impls_non_type.carbon
  213. library "[[@TEST_NAME]]";
  214. interface Y {}
  215. constraint Z(T:! type) {
  216. // CHECK:STDERR: fail_impls_non_type.carbon:[[@LINE+4]]:17: error: `require` declaration constrained by a non-facet type; expected an `interface` or `constraint` name after `impls` [RequireImplsMissingFacetType]
  217. // CHECK:STDERR: require impls 1;
  218. // CHECK:STDERR: ^
  219. // CHECK:STDERR:
  220. require impls 1;
  221. }
  222. // --- require_self_in_requirement.carbon
  223. library "[[@TEST_NAME]]";
  224. interface Y {
  225. let Y1:! type;
  226. }
  227. //@dump-sem-ir-begin
  228. constraint Z {
  229. // Self can appear in a requirement.
  230. require impls Y where .Y1 = Self;
  231. }
  232. //@dump-sem-ir-end
  233. // CHECK:STDOUT: --- fail_todo_extend.carbon
  234. // CHECK:STDOUT:
  235. // CHECK:STDOUT: constants {
  236. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  237. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  238. // CHECK:STDOUT: %Self.861: %Z.type = symbolic_binding Self, 0 [symbolic]
  239. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.861 [symbolic]
  240. // CHECK:STDOUT: }
  241. // CHECK:STDOUT:
  242. // CHECK:STDOUT: imports {
  243. // CHECK:STDOUT: }
  244. // CHECK:STDOUT:
  245. // CHECK:STDOUT: file {
  246. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  247. // CHECK:STDOUT: }
  248. // CHECK:STDOUT:
  249. // CHECK:STDOUT: constraint @Z {
  250. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.861]
  251. // CHECK:STDOUT: %Z.require0.decl = require_decl @Z.require0 [concrete] {
  252. // CHECK:STDOUT: require %Self.as_type impls %Y.ref
  253. // CHECK:STDOUT: } {
  254. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  255. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
  256. // CHECK:STDOUT: }
  257. // CHECK:STDOUT:
  258. // CHECK:STDOUT: !members:
  259. // CHECK:STDOUT: .Self = %Self
  260. // CHECK:STDOUT: .Y = <poisoned>
  261. // CHECK:STDOUT:
  262. // CHECK:STDOUT: !requires:
  263. // CHECK:STDOUT: @Z.require0 {
  264. // CHECK:STDOUT: require @Z.require0.%Self.as_type impls @Z.require0.%Y.ref
  265. // CHECK:STDOUT: }
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT:
  268. // CHECK:STDOUT: generic require @Z.require0(@Z.%Self: %Z.type) {
  269. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.861)]
  270. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: specific @Z.require0(constants.%Self.861) {
  274. // CHECK:STDOUT: %Self => constants.%Self.861
  275. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: --- implicit_self_impls.carbon
  279. // CHECK:STDOUT:
  280. // CHECK:STDOUT: constants {
  281. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  282. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  283. // CHECK:STDOUT: %Self.861: %Z.type = symbolic_binding Self, 0 [symbolic]
  284. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.861 [symbolic]
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT:
  287. // CHECK:STDOUT: imports {
  288. // CHECK:STDOUT: }
  289. // CHECK:STDOUT:
  290. // CHECK:STDOUT: file {
  291. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  292. // CHECK:STDOUT: }
  293. // CHECK:STDOUT:
  294. // CHECK:STDOUT: constraint @Z {
  295. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.861]
  296. // CHECK:STDOUT: %Z.require0.decl = require_decl @Z.require0 [concrete] {
  297. // CHECK:STDOUT: require %Self.as_type impls %Y.ref
  298. // CHECK:STDOUT: } {
  299. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  300. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
  301. // CHECK:STDOUT: }
  302. // CHECK:STDOUT:
  303. // CHECK:STDOUT: !members:
  304. // CHECK:STDOUT: .Self = %Self
  305. // CHECK:STDOUT: .Y = <poisoned>
  306. // CHECK:STDOUT:
  307. // CHECK:STDOUT: !requires:
  308. // CHECK:STDOUT: @Z.require0 {
  309. // CHECK:STDOUT: require @Z.require0.%Self.as_type impls @Z.require0.%Y.ref
  310. // CHECK:STDOUT: }
  311. // CHECK:STDOUT: }
  312. // CHECK:STDOUT:
  313. // CHECK:STDOUT: generic require @Z.require0(@Z.%Self: %Z.type) {
  314. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.861)]
  315. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  316. // CHECK:STDOUT: }
  317. // CHECK:STDOUT:
  318. // CHECK:STDOUT: specific @Z.require0(constants.%Self.861) {
  319. // CHECK:STDOUT: %Self => constants.%Self.861
  320. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  321. // CHECK:STDOUT: }
  322. // CHECK:STDOUT:
  323. // CHECK:STDOUT: --- explicit_self_impls.carbon
  324. // CHECK:STDOUT:
  325. // CHECK:STDOUT: constants {
  326. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  327. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  328. // CHECK:STDOUT: %Self.861: %Z.type = symbolic_binding Self, 0 [symbolic]
  329. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.861 [symbolic]
  330. // CHECK:STDOUT: }
  331. // CHECK:STDOUT:
  332. // CHECK:STDOUT: imports {
  333. // CHECK:STDOUT: }
  334. // CHECK:STDOUT:
  335. // CHECK:STDOUT: file {
  336. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  337. // CHECK:STDOUT: }
  338. // CHECK:STDOUT:
  339. // CHECK:STDOUT: constraint @Z {
  340. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.861]
  341. // CHECK:STDOUT: %Z.require0.decl = require_decl @Z.require0 [concrete] {
  342. // CHECK:STDOUT: require %.loc9 impls %Y.ref
  343. // CHECK:STDOUT: } {
  344. // CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.861)]
  345. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  346. // CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  347. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
  348. // CHECK:STDOUT: }
  349. // CHECK:STDOUT:
  350. // CHECK:STDOUT: !members:
  351. // CHECK:STDOUT: .Self = %Self
  352. // CHECK:STDOUT: .Y = <poisoned>
  353. // CHECK:STDOUT:
  354. // CHECK:STDOUT: !requires:
  355. // CHECK:STDOUT: @Z.require0 {
  356. // CHECK:STDOUT: require @Z.require0.%.loc9 impls @Z.require0.%Y.ref
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT: }
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: generic require @Z.require0(@Z.%Self: %Z.type) {
  361. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.861)]
  362. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  363. // CHECK:STDOUT: }
  364. // CHECK:STDOUT:
  365. // CHECK:STDOUT: specific @Z.require0(constants.%Self.861) {
  366. // CHECK:STDOUT: %Self => constants.%Self.861
  367. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  368. // CHECK:STDOUT: }
  369. // CHECK:STDOUT:
  370. // CHECK:STDOUT: --- explicit_self_specific_impls.carbon
  371. // CHECK:STDOUT:
  372. // CHECK:STDOUT: constants {
  373. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  374. // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
  375. // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
  376. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  377. // CHECK:STDOUT: %Self.861: %Z.type = symbolic_binding Self, 0 [symbolic]
  378. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.861 [symbolic]
  379. // CHECK:STDOUT: %C.42a: type = class_type @C, @C(%Self.binding.as_type) [symbolic]
  380. // CHECK:STDOUT: }
  381. // CHECK:STDOUT:
  382. // CHECK:STDOUT: imports {
  383. // CHECK:STDOUT: }
  384. // CHECK:STDOUT:
  385. // CHECK:STDOUT: file {
  386. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  387. // CHECK:STDOUT: }
  388. // CHECK:STDOUT:
  389. // CHECK:STDOUT: constraint @Z {
  390. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.861]
  391. // CHECK:STDOUT: %Z.require0.decl = require_decl @Z.require0 [concrete] {
  392. // CHECK:STDOUT: require %C.loc9_17.1 impls %Y.ref
  393. // CHECK:STDOUT: } {
  394. // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
  395. // CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.861)]
  396. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  397. // CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  398. // CHECK:STDOUT: %C.loc9_17.1: type = class_type @C, @C(constants.%Self.binding.as_type) [symbolic = %C.loc9_17.2 (constants.%C.42a)]
  399. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
  400. // CHECK:STDOUT: }
  401. // CHECK:STDOUT:
  402. // CHECK:STDOUT: !members:
  403. // CHECK:STDOUT: .Self = %Self
  404. // CHECK:STDOUT: .C = <poisoned>
  405. // CHECK:STDOUT: .Y = <poisoned>
  406. // CHECK:STDOUT:
  407. // CHECK:STDOUT: !requires:
  408. // CHECK:STDOUT: @Z.require0 {
  409. // CHECK:STDOUT: require @Z.require0.%C.loc9_17.1 impls @Z.require0.%Y.ref
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT: }
  412. // CHECK:STDOUT:
  413. // CHECK:STDOUT: generic require @Z.require0(@Z.%Self: %Z.type) {
  414. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.861)]
  415. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  416. // CHECK:STDOUT: %C.loc9_17.2: type = class_type @C, @C(%Self.binding.as_type) [symbolic = %C.loc9_17.2 (constants.%C.42a)]
  417. // CHECK:STDOUT: }
  418. // CHECK:STDOUT:
  419. // CHECK:STDOUT: specific @Z.require0(constants.%Self.861) {
  420. // CHECK:STDOUT: %Self => constants.%Self.861
  421. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  422. // CHECK:STDOUT: %C.loc9_17.2 => constants.%C.42a
  423. // CHECK:STDOUT: }
  424. // CHECK:STDOUT:
  425. // CHECK:STDOUT: --- require_impls_where.carbon
  426. // CHECK:STDOUT:
  427. // CHECK:STDOUT: constants {
  428. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  429. // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
  430. // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%Y1 [concrete]
  431. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  432. // CHECK:STDOUT: %Self.861: %Z.type = symbolic_binding Self, 0 [symbolic]
  433. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.861 [symbolic]
  434. // CHECK:STDOUT: %.Self: %Y.type = symbolic_binding .Self [symbolic_self]
  435. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  436. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  437. // CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @Y [symbolic_self]
  438. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic_self]
  439. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  440. // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where %impl.elem0 = %empty_tuple.type> [concrete]
  441. // CHECK:STDOUT: }
  442. // CHECK:STDOUT:
  443. // CHECK:STDOUT: imports {
  444. // CHECK:STDOUT: }
  445. // CHECK:STDOUT:
  446. // CHECK:STDOUT: file {
  447. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  448. // CHECK:STDOUT: }
  449. // CHECK:STDOUT:
  450. // CHECK:STDOUT: constraint @Z {
  451. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.861]
  452. // CHECK:STDOUT: %Z.require0.decl = require_decl @Z.require0 [concrete] {
  453. // CHECK:STDOUT: require %Self.as_type impls %.loc7_19
  454. // CHECK:STDOUT: } {
  455. // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  456. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
  457. // CHECK:STDOUT: <elided>
  458. // CHECK:STDOUT: %.Self.ref: %Y.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  459. // CHECK:STDOUT: %Y1.ref: %Y.assoc_type = name_ref Y1, @Y1.%assoc0 [concrete = constants.%assoc0]
  460. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  461. // CHECK:STDOUT: %.loc7_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  462. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  463. // CHECK:STDOUT: %.loc7_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
  464. // CHECK:STDOUT: %.loc7_32.2: type = converted %.loc7_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  465. // CHECK:STDOUT: %.loc7_19: type = where_expr %.Self [concrete = constants.%Y_where.type] {
  466. // CHECK:STDOUT: requirement_base_facet_type constants.%Y.type
  467. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc7_32.2
  468. // CHECK:STDOUT: }
  469. // CHECK:STDOUT: }
  470. // CHECK:STDOUT:
  471. // CHECK:STDOUT: !members:
  472. // CHECK:STDOUT: .Self = %Self
  473. // CHECK:STDOUT: .Y = <poisoned>
  474. // CHECK:STDOUT:
  475. // CHECK:STDOUT: !requires:
  476. // CHECK:STDOUT: @Z.require0 {
  477. // CHECK:STDOUT: require @Z.require0.%Self.as_type impls @Z.require0.%.loc7_19
  478. // CHECK:STDOUT: }
  479. // CHECK:STDOUT: }
  480. // CHECK:STDOUT:
  481. // CHECK:STDOUT: generic require @Z.require0(@Z.%Self: %Z.type) {
  482. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.861)]
  483. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  484. // CHECK:STDOUT: }
  485. // CHECK:STDOUT:
  486. // CHECK:STDOUT: specific @Z.require0(constants.%Self.861) {
  487. // CHECK:STDOUT: %Self => constants.%Self.861
  488. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  489. // CHECK:STDOUT: }
  490. // CHECK:STDOUT:
  491. // CHECK:STDOUT: --- fail_require_impls_incomplete_constraint.carbon
  492. // CHECK:STDOUT:
  493. // CHECK:STDOUT: constants {
  494. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  495. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic]
  496. // CHECK:STDOUT: }
  497. // CHECK:STDOUT:
  498. // CHECK:STDOUT: imports {
  499. // CHECK:STDOUT: }
  500. // CHECK:STDOUT:
  501. // CHECK:STDOUT: file {
  502. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  503. // CHECK:STDOUT: }
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: constraint @Z {
  506. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  507. // CHECK:STDOUT:
  508. // CHECK:STDOUT: !members:
  509. // CHECK:STDOUT: .Self = %Self
  510. // CHECK:STDOUT: .Y = <poisoned>
  511. // CHECK:STDOUT:
  512. // CHECK:STDOUT: !requires:
  513. // CHECK:STDOUT: }
  514. // CHECK:STDOUT:
  515. // CHECK:STDOUT: --- fail_require_impls_incomplete_self.carbon
  516. // CHECK:STDOUT:
  517. // CHECK:STDOUT: constants {
  518. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  519. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic]
  520. // CHECK:STDOUT: }
  521. // CHECK:STDOUT:
  522. // CHECK:STDOUT: imports {
  523. // CHECK:STDOUT: }
  524. // CHECK:STDOUT:
  525. // CHECK:STDOUT: file {
  526. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  527. // CHECK:STDOUT: }
  528. // CHECK:STDOUT:
  529. // CHECK:STDOUT: constraint @Z {
  530. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
  531. // CHECK:STDOUT:
  532. // CHECK:STDOUT: !members:
  533. // CHECK:STDOUT: .Self = %Self
  534. // CHECK:STDOUT: .Z = <poisoned>
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: !requires:
  537. // CHECK:STDOUT: }
  538. // CHECK:STDOUT:
  539. // CHECK:STDOUT: --- fail_require_impls_incomplete_self_specific.carbon
  540. // CHECK:STDOUT:
  541. // CHECK:STDOUT: constants {
  542. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  543. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  544. // CHECK:STDOUT: %Z.type.82a: type = generic_named_constaint_type @Z [concrete]
  545. // CHECK:STDOUT: %empty_struct: %Z.type.82a = struct_value () [concrete]
  546. // CHECK:STDOUT: %Z.type.b8d23b.1: type = facet_type <@Z, @Z(%T)> [symbolic]
  547. // CHECK:STDOUT: %Self: %Z.type.b8d23b.1 = symbolic_binding Self, 1 [symbolic]
  548. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic]
  549. // CHECK:STDOUT: }
  550. // CHECK:STDOUT:
  551. // CHECK:STDOUT: imports {
  552. // CHECK:STDOUT: }
  553. // CHECK:STDOUT:
  554. // CHECK:STDOUT: file {
  555. // CHECK:STDOUT: %Z.decl: %Z.type.82a = constraint_decl @Z [concrete = constants.%empty_struct] {
  556. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  557. // CHECK:STDOUT: } {
  558. // CHECK:STDOUT: <elided>
  559. // CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
  560. // CHECK:STDOUT: }
  561. // CHECK:STDOUT: }
  562. // CHECK:STDOUT:
  563. // CHECK:STDOUT: generic constraint @Z(%T.loc4_14.2: type) {
  564. // CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)]
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: !definition:
  567. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc4_14.1)> [symbolic = %Z.type (constants.%Z.type.b8d23b.1)]
  568. // CHECK:STDOUT: %Self.loc4_24.2: @Z.%Z.type (%Z.type.b8d23b.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self)]
  569. // CHECK:STDOUT:
  570. // CHECK:STDOUT: constraint {
  571. // CHECK:STDOUT: %Self.loc4_24.1: @Z.%Z.type (%Z.type.b8d23b.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self)]
  572. // CHECK:STDOUT:
  573. // CHECK:STDOUT: !members:
  574. // CHECK:STDOUT: .Self = %Self.loc4_24.1
  575. // CHECK:STDOUT: .T = <poisoned>
  576. // CHECK:STDOUT: .Z = <poisoned>
  577. // CHECK:STDOUT:
  578. // CHECK:STDOUT: !requires:
  579. // CHECK:STDOUT: }
  580. // CHECK:STDOUT: }
  581. // CHECK:STDOUT:
  582. // CHECK:STDOUT: specific @Z(constants.%T) {
  583. // CHECK:STDOUT: %T.loc4_14.1 => constants.%T
  584. // CHECK:STDOUT: }
  585. // CHECK:STDOUT:
  586. // CHECK:STDOUT: specific @Z(constants.%Self.binding.as_type) {
  587. // CHECK:STDOUT: %T.loc4_14.1 => constants.%Self.binding.as_type
  588. // CHECK:STDOUT: }
  589. // CHECK:STDOUT:
  590. // CHECK:STDOUT: --- fail_require_impls_without_self.carbon
  591. // CHECK:STDOUT:
  592. // CHECK:STDOUT: constants {
  593. // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
  594. // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
  595. // CHECK:STDOUT: %Z.type.82a: type = generic_named_constaint_type @Z [concrete]
  596. // CHECK:STDOUT: %empty_struct: %Z.type.82a = struct_value () [concrete]
  597. // CHECK:STDOUT: %Z.type.b8d: type = facet_type <@Z, @Z(%T)> [symbolic]
  598. // CHECK:STDOUT: %Self.aa1: %Z.type.b8d = symbolic_binding Self, 1 [symbolic]
  599. // CHECK:STDOUT: }
  600. // CHECK:STDOUT:
  601. // CHECK:STDOUT: imports {
  602. // CHECK:STDOUT: }
  603. // CHECK:STDOUT:
  604. // CHECK:STDOUT: file {
  605. // CHECK:STDOUT: %Z.decl: %Z.type.82a = constraint_decl @Z [concrete = constants.%empty_struct] {
  606. // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete]
  607. // CHECK:STDOUT: } {
  608. // CHECK:STDOUT: <elided>
  609. // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  610. // CHECK:STDOUT: }
  611. // CHECK:STDOUT: }
  612. // CHECK:STDOUT:
  613. // CHECK:STDOUT: generic constraint @Z(%T.loc8_14.2: type) {
  614. // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
  615. // CHECK:STDOUT:
  616. // CHECK:STDOUT: !definition:
  617. // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc8_14.1)> [symbolic = %Z.type (constants.%Z.type.b8d)]
  618. // CHECK:STDOUT: %Self.loc8_24.2: @Z.%Z.type (%Z.type.b8d) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self.aa1)]
  619. // CHECK:STDOUT:
  620. // CHECK:STDOUT: constraint {
  621. // CHECK:STDOUT: %Self.loc8_24.1: @Z.%Z.type (%Z.type.b8d) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self.aa1)]
  622. // CHECK:STDOUT:
  623. // CHECK:STDOUT: !members:
  624. // CHECK:STDOUT: .Self = %Self.loc8_24.1
  625. // CHECK:STDOUT: .T = <poisoned>
  626. // CHECK:STDOUT: .Y = <poisoned>
  627. // CHECK:STDOUT:
  628. // CHECK:STDOUT: !requires:
  629. // CHECK:STDOUT: }
  630. // CHECK:STDOUT: }
  631. // CHECK:STDOUT:
  632. // CHECK:STDOUT: specific @Z(constants.%T) {
  633. // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
  634. // CHECK:STDOUT: }
  635. // CHECK:STDOUT:
  636. // CHECK:STDOUT: --- require_self_in_requirement.carbon
  637. // CHECK:STDOUT:
  638. // CHECK:STDOUT: constants {
  639. // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete]
  640. // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete]
  641. // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%Y1 [concrete]
  642. // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete]
  643. // CHECK:STDOUT: %Self.861: %Z.type = symbolic_binding Self, 0 [symbolic]
  644. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.861 [symbolic]
  645. // CHECK:STDOUT: %.Self: %Y.type = symbolic_binding .Self [symbolic_self]
  646. // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self]
  647. // CHECK:STDOUT: %Y.lookup_impl_witness: <witness> = lookup_impl_witness %.Self, @Y [symbolic_self]
  648. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic_self]
  649. // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where %impl.elem0 = %Self.binding.as_type> [symbolic]
  650. // CHECK:STDOUT: }
  651. // CHECK:STDOUT:
  652. // CHECK:STDOUT: imports {
  653. // CHECK:STDOUT: }
  654. // CHECK:STDOUT:
  655. // CHECK:STDOUT: file {
  656. // CHECK:STDOUT: %Z.decl: type = constraint_decl @Z [concrete = constants.%Z.type] {} {}
  657. // CHECK:STDOUT: }
  658. // CHECK:STDOUT:
  659. // CHECK:STDOUT: constraint @Z {
  660. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.861]
  661. // CHECK:STDOUT: %Z.require0.decl = require_decl @Z.require0 [concrete] {
  662. // CHECK:STDOUT: require %Self.as_type.loc10_11 impls %.loc10_19
  663. // CHECK:STDOUT: } {
  664. // CHECK:STDOUT: %Self.as_type.loc10_11: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  665. // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type]
  666. // CHECK:STDOUT: <elided>
  667. // CHECK:STDOUT: %.Self.ref: %Y.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
  668. // CHECK:STDOUT: %Y1.ref: %Y.assoc_type = name_ref Y1, @Y1.%assoc0 [concrete = constants.%assoc0]
  669. // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type]
  670. // CHECK:STDOUT: %.loc10_25: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type]
  671. // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
  672. // CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.861)]
  673. // CHECK:STDOUT: %Self.as_type.loc10_31: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  674. // CHECK:STDOUT: %.loc10_31: type = converted %Self.ref, %Self.as_type.loc10_31 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  675. // CHECK:STDOUT: %.loc10_19: type = where_expr %.Self [symbolic = %Y_where.type (constants.%Y_where.type)] {
  676. // CHECK:STDOUT: requirement_base_facet_type constants.%Y.type
  677. // CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_31
  678. // CHECK:STDOUT: }
  679. // CHECK:STDOUT: }
  680. // CHECK:STDOUT:
  681. // CHECK:STDOUT: !members:
  682. // CHECK:STDOUT: .Self = %Self
  683. // CHECK:STDOUT: .Y = <poisoned>
  684. // CHECK:STDOUT:
  685. // CHECK:STDOUT: !requires:
  686. // CHECK:STDOUT: @Z.require0 {
  687. // CHECK:STDOUT: require @Z.require0.%Self.as_type.loc10_11 impls @Z.require0.%.loc10_19
  688. // CHECK:STDOUT: }
  689. // CHECK:STDOUT: }
  690. // CHECK:STDOUT:
  691. // CHECK:STDOUT: generic require @Z.require0(@Z.%Self: %Z.type) {
  692. // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.861)]
  693. // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
  694. // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where constants.%impl.elem0 = %Self.binding.as_type> [symbolic = %Y_where.type (constants.%Y_where.type)]
  695. // CHECK:STDOUT: }
  696. // CHECK:STDOUT:
  697. // CHECK:STDOUT: specific @Z.require0(constants.%Self.861) {
  698. // CHECK:STDOUT: %Self => constants.%Self.861
  699. // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
  700. // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type
  701. // CHECK:STDOUT: }
  702. // CHECK:STDOUT: