Skip to content

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
@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