Skip to content

Have checkNotPrivate skip over private aliases. #1171

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 13, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 12, 2016

CheckNotPrivate now avoids private aliases, so that types sat prepresentable in
transformation phases.

This does not solve the problem that private classes or abstract types might leak coming
from Scala 2, but there is not really a good cure for that. We can reject them outright or
allow them under language:Scala2 and hope for the best.

Fixes #1130

Review by @smarter

CheckNotPrivate now avoids private aliases, so that types sat prepresentable in
transformation phases.

This does not solve the problem that private classes or abstract types might leak coming
from Scala 2, but there is not really a good cure for that. We can reject them outright or
allow them under language:Scala2 and hope for the best.
@smarter
Copy link
Member

smarter commented Mar 12, 2016

so that types sat prepresentable in transformation phases

I think there's a few typos in this description, what's "prepresentable"?

@smarter
Copy link
Member

smarter commented Mar 12, 2016

This does not solve the problem that private classes or abstract types might leak coming
from Scala 2, but there is not really a good cure for that.

So how come this works in Scala 2 with separate compilation? Is there something we should do differently in unpickling to see these private types?

@DarkDimius
Copy link
Contributor

So how come this works in Scala 2 with separate compilation?

See related issues to https://issues.scala-lang.org/browse/SI-6794 I'm not sure it reliably works even without separate compilation.

@odersky
Copy link
Contributor Author

odersky commented Mar 12, 2016

So how come this works in Scala 2 with separate compilation?

I'll have to write this up in detail at some point. It's a fundamental issue.

@smarter
Copy link
Member

smarter commented Mar 13, 2016

LGTM.

I'll have to write this up in detail at some point. It's a fundamental issue.

Sounds interesting!

smarter added a commit that referenced this pull request Mar 13, 2016
Have checkNotPrivate skip over private aliases.
@smarter smarter merged commit fe94b7a into scala:master Mar 13, 2016
@allanrenucci allanrenucci deleted the fix-#1130 branch December 14, 2017 16:59
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.

4 participants