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

Properly refine type of inlined unapply pattern #18292

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

nicolasstucki
Copy link
Contributor

Fixes #17525

@nicolasstucki nicolasstucki force-pushed the fix-17525 branch 3 times, most recently from f9d286a to 4aed8ec Compare July 26, 2023 08:49
@nicolasstucki nicolasstucki requested a review from smarter July 27, 2023 13:05
object Extract {
transparent inline def unapply(value: String): Option[Tuple] = Some((1, "two"))
}
def fail(): Unit = "" match { case Extract(a, b) => }
Copy link
Member

Choose a reason for hiding this comment

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

can you make the test do stuff in the case based on the transparent type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@smarter smarter assigned nicolasstucki and unassigned smarter Aug 2, 2023
@nicolasstucki nicolasstucki enabled auto-merge August 3, 2023 07:59
@nicolasstucki nicolasstucki merged commit 5077404 into scala:main Aug 3, 2023
@nicolasstucki nicolasstucki deleted the fix-17525 branch August 3, 2023 09:24
Kordyjan added a commit that referenced this pull request Dec 8, 2023
…9144)

Backports #18292 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
@Kordyjan Kordyjan added this to the 3.3.2 milestone Dec 14, 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.

Transparent inline unapply causes compiler crash
3 participants