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

Teach typedConstructorPattern to ignore non-redefining unapplies #9462

Merged
merged 2 commits into from Feb 3, 2021

Conversation

dwijnand
Copy link
Member

In pos/t12250.scala Foo defines an unapply which doesn't redefine the
synthetic one. Thus unapply is overloaded. In the pattern being typed,
the synthetic one is indeed the one seeked, so despite being overloaded,
we should convertToCaseConstructor.

Fixes scala/bug#12250

@scala-jenkins scala-jenkins added this to the 2.13.5 milestone Jan 28, 2021
@lrytz

This comment has been minimized.

@dwijnand

This comment has been minimized.

@dwijnand
Copy link
Member Author

Fixed my boolean algebra mistake.

Just recording the current behaviour, to confirm the next commit doesn't
regress them.
In pos/t12250.scala Foo defines an unapply which doesn't redefine the
synthetic one.  Thus unapply is overloaded.  In the pattern being typed,
the synthetic one is indeed the one seeked, so despite being overloaded,
we should convertToCaseConstructor.
@dwijnand
Copy link
Member Author

dwijnand commented Feb 3, 2021

Seth was ready to merge, but I wanted to review this detail, so it can be merged now once it's green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants