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 #5827: Don't copy protected flag to apply method of case class #5830

Merged
merged 2 commits into from
Feb 2, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 1, 2019

No description provided.

@odersky odersky requested a review from nicolasstucki February 1, 2019 09:32
@odersky odersky added the fasttrack Simple fix. Reviewer should merge or apply additional changes directly. label Feb 1, 2019
@Jasper-M
Copy link
Contributor

Jasper-M commented Feb 1, 2019

On the one hand, with the current semantics of protected a protected method in an object is a bit silly as it is more or less the same as a private one. But on the other hand, it's a bit inconsistent to special case private. And why would anyone make a constructor protected if they still automatically get a public factory method?

Actually I would half expect the companion object of a class to have access to the protected members of the superclass of that class, and of the companion object of that superclass. But that's another can of worms...

@odersky
Copy link
Contributor Author

odersky commented Feb 1, 2019

@Jasper-M protected simply makes no sense in an object, so we have to drop it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fasttrack Simple fix. Reviewer should merge or apply additional changes directly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants