Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pyrefly/lib/test/recursive_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,19 @@ not x
"#,
);

testcase!(
test_cyclic_alias_through_type_parameter_bound,
r#"
# Regression test for #2851: resolving `Y`'s scoped type parameter bound closes
# a cycle through `X`. Using the alias used to make the solver recurse forever.
type X = Y # E: cyclic self-reference in `X`
type Y[T: X] = X # E: cyclic self-reference in `Y`

x: X = 1
not x
"#,
);

testcase!(
test_cyclic_no_base_case,
r#"
Expand Down
Loading