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

Fix i18518 #18520

Merged
merged 2 commits into from
Oct 1, 2023
Merged

Fix i18518 #18520

merged 2 commits into from
Oct 1, 2023

Conversation

Linyxus
Copy link
Contributor

@Linyxus Linyxus commented Sep 6, 2023

Fix #18518.

It is an implementation restriction that a value parameter has to follow a type abstraction. So [X] -> T ->{x} U should be rejected as a capturing type follows the type abstraction,but it wasn't. This PR refines the check in Parsers.scala to reject this case properly.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

LGTM

@odersky odersky merged commit f859640 into scala:main Oct 1, 2023
17 checks passed
@odersky odersky deleted the fix-18518 branch October 1, 2023 14:45
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 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.

Any capturing function type immediately after a type abstraction crashes the compiler
3 participants