Skip to content

Cyclic reference in type is not detected #15507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
odersky opened this issue Jun 23, 2022 · 0 comments · Fixed by #15508
Closed

Cyclic reference in type is not detected #15507

odersky opened this issue Jun 23, 2022 · 0 comments · Fixed by #15508
Assignees
Milestone

Comments

@odersky
Copy link
Contributor

odersky commented Jun 23, 2022

Compiler version

3.2.0-RC1

Minimized code

type _NestedSet2[_] = Set[_NestedSet2[?]]

Output

Compiles, but reduces the right hand side to Set[Any].

Expectation

Definition should be rejected since it contains a cycle.

@odersky odersky added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 23, 2022
@odersky odersky self-assigned this Jun 23, 2022
odersky added a commit to dotty-staging/dotty that referenced this issue Jun 23, 2022
scala#15507 escaped the cycle detector since when the right hand side was typechecked,
the type constructor _NestedSet2's type was `[X] <: Any` and the constructor was marked Provisional.

Fixes scala#15507
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants