File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class ExpandPrivate extends MiniPhaseTransform with IdentityDenotTransformer { t
75
75
private def ensurePrivateAccessible (d : SymDenotation )(implicit ctx : Context ) =
76
76
if (isVCPrivateParamAccessor(d))
77
77
d.ensureNotPrivate.installAfter(thisTransform)
78
- else if (d.is(PrivateTerm ) && d.owner != ctx.owner.enclosingClass) {
78
+ else if (d.is(PrivateTerm ) && ! d.owner.is( Package ) && d.owner != ctx.owner.enclosingClass) {
79
79
// Paths `p1` and `p2` are similar if they have a common suffix that follows
80
80
// possibly different directory paths. That is, their common suffix extends
81
81
// in both cases either to the start of the path or to a file separator character.
Original file line number Diff line number Diff line change
1
+ package test
2
+ // case class A(x: Int)
3
+ private object A { def apply (x : Int ) = () }
Original file line number Diff line number Diff line change
1
+ package test
2
+ object B {
3
+ A (0 )
4
+ }
You can’t perform that action at this time.
0 commit comments