-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #997 #1066
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 #997 #1066
Conversation
/rebuild |
val errors1 = | ||
if (tp.symbol.is(Private) && | ||
!accessBoundary(sym).isContainedIn(tp.symbol.owner)) { | ||
(d"non-private $sym refers to private ${tp.symbol}\n in its type signature ${sym.info}", tree.pos) :: errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just call ctx.errorOrMigrationWarning
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we might end up not issuing the error if a parent is a TypeAlias.
Ready to merge? |
LGTM |
Previously, some definitions were too public, others too private.
First version. Fixes scala#997.
Also: include a test that private aliases are transparent.
Rebased to master |
Ensure that private references do not leak. Review by @DarkDimius