File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ import dotty.tools.dotc.core.Flags
6
6
import dotty .tools .dotc .core .Types .AndType
7
7
import dotty .tools .dotc .transform .MegaPhase ._
8
8
import tpd ._
9
-
10
-
9
+ import dotty .tools .dotc .core .Decorators ._
11
10
12
11
/**
13
12
* This transform makes sure that all private member selections from
@@ -22,7 +21,10 @@ class CrossCastAnd extends MiniPhase {
22
21
23
22
lazy val qtype = tree.qualifier.tpe.widen
24
23
val sym = tree.symbol
25
- if (sym.is(Flags .Private ) && ! sym.isConstructor && qtype.typeSymbol != sym.owner)
24
+ if sym.is(Flags .Private )
25
+ && ! sym.isConstructor
26
+ && qtype.classSymbol != sym.owner
27
+ then
26
28
cpy.Select (tree)(tree.qualifier.cast(AndType (qtype.baseType(sym.owner), tree.qualifier.tpe)), tree.name)
27
29
else tree
28
30
}
You can’t perform that action at this time.
0 commit comments