File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -808,9 +808,14 @@ object Types {
808808 // is made to save execution time in the common case. See i9844.scala for test cases.
809809 def qualifies (sd : SingleDenotation ) =
810810 ! sd.symbol.is(Private ) || sd.symbol.owner == tp.cls
811- d match
811+ d. match
812812 case d : SingleDenotation => if qualifies(d) then d else NoDenotation
813813 case d => d.filterWithPredicate(qualifies)
814+ .orElse:
815+ // Only inaccessible private symbols were found. But there could still be
816+ // shadowed non-private symbols, so as a fallback search for those.
817+ // Test case is i18361.scala.
818+ findMember(name, pre, required, excluded | Private )
814819 else d
815820 else
816821 // There is a special case to handle:
Original file line number Diff line number Diff line change 1+ package test1:
2+ class Service (val name : String )
3+ class CrudService (name : String ) extends Service (name)
4+
5+ trait Foo { self : CrudService =>
6+ val x = self.name
7+ }
8+
9+ package test2:
10+ abstract class Service [F [_]](val name : String )
11+ abstract class CrudService [F [_]](name : String ) extends Service [F ](name)
12+
13+ trait Foo [F [_]] { self : CrudService [? ] =>
14+ val x = self.name
15+ }
You can’t perform that action at this time.
0 commit comments