Skip to content
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

Delay opaque alias checking until PostTyper #16644

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 9, 2023

When we have a TypeBounds tree that also has an alias, we checked that the alias is within bounds at Typer. This could provoke a CyclicReference when processing opaque type aliases where the type has a bound and also the alias refers back to the type. We avoid the problem by performing the check at PostTyper, analogous to other bounds checks.

Fixes #16642

When we have a TypeBounds tree that also has an alias, we checked
that the alias is within bounds at Typer. This could provoke a
CyclicReference when processing opaque type aliases where
the type has a bound and also the alias refers back to the type.
We avoid the problem by performing the check at PostTyper, analogous
to other bounds checks.

Fixes scala#16642
@odersky odersky added this to the 3.3.0-RC1 milestone Jan 9, 2023
@odersky odersky merged commit 4fa0715 into scala:main Jan 10, 2023
@odersky odersky deleted the fix-16642 branch January 10, 2023 07:53
@Kordyjan Kordyjan modified the milestones: 3.3.0-RC1, 3.3.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Over-eager Cyclic References when compiling Opaque Types
3 participants