Skip to content

Commit b5b219a

Browse files
committed
test-type-and-self-parameter
1 parent ff7183b commit b5b219a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

toolchain/check/testdata/facet/period_self.carbon

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ interface I(T:! type) {
304304
// later being constrained by `T.A`.
305305
fn F(T:! I(.Self) where .A = (I(.Self) where .A = I(.Self))) {}
306306

307+
308+
// --- period_self_parameter_sees_lhs_of_where_expr.carbon
309+
library "[[@TEST_NAME]]";
310+
311+
interface I(T:! Core.Destroy) {}
312+
313+
// The `.Self` can see the LHS of the `where` to know `U` impls Core.Destroy.
314+
fn F(U:! Core.Destroy where .Self impls I(.Self)) {}
315+
307316
// CHECK:STDOUT: --- period_self_param.carbon
308317
// CHECK:STDOUT:
309318
// CHECK:STDOUT: constants {

0 commit comments

Comments
 (0)