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

Recursion brake for joins in TypeComparer #14880

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 7, 2022

Don't recursively apply joins on the left hand side if it contains
an AndType, in order to prevent possible exponential explosions.

Fixes #14870

Don't recursively apply joins on the left hand side if it contains
an AndType, in order to prevent possible exponential explosions.

Fixes scala#14870
@odersky odersky requested a review from dwijnand April 8, 2022 06:03
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hesitated a bit because it felt like a high price to pay to add yet another piece of instance state for such a niche case. But it's carefully managed, so I'm ok with it.

@dwijnand dwijnand merged commit e295c1f into scala:main Apr 9, 2022
@dwijnand dwijnand deleted the fix-14870 branch April 9, 2022 08:31
@Kordyjan Kordyjan added this to the 3.2.0 milestone 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.

Compilation never stops with an upper bounded type param using a union type with 3 types
3 participants