Skip to content

Fix #3861: Spec changes to extractors implemented in #3747 #4024

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

Merged
merged 1 commit into from
Mar 15, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 21, 2018

Fixes #3861

@odersky odersky changed the title Fix #3747: Spec changes to extractors Fix #3861: Spec changes to extractors implemented in #3747 Feb 21, 2018

class Person(val name: String, val children: Person *)
object Person {
def unapplySeq(p: Person) = Some((p.name, p.children))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a paragraph explaining the rules that make an unapply qualify for vararg extraction. I am not even sure what are the rules myself. The return type must be of the form Option[Seq[T]] or Option[(..., Seq[T])]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't context switch into that, sorry. Constant context switching is what kills my productivity. So either somebody else digs out the details and adds them or we leave it as is. Again, my plea stands that somebody will have to take over the pattern matching problematic.

@odersky
Copy link
Contributor Author

odersky commented Mar 15, 2018

No activity for 3 weeks + 1 day. We either merge or close. Since I can't see a reason why this PR could make things worse I am merging. But we have to get better moving things along.

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.

3 participants