File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ object SymUtils:
109
109
def problem (child : Symbol ) = {
110
110
111
111
def isAccessible (sym : Symbol ): Boolean =
112
- (self.isContainedIn(sym) && (companionMirror || declScope.isContainedIn(sym )))
112
+ (self.isContainedIn(sym) && (companionMirror || sym.isAccessibleFrom(declScope.thisType )))
113
113
|| sym.is(Module ) && isAccessible(sym.owner)
114
114
115
115
if (child == self) " it has anonymous or inaccessible subclasses"
Original file line number Diff line number Diff line change
1
+ import scala .deriving .Mirror
2
+
3
+ class Scope extends IListDefn {
4
+
5
+ type Of = Mirror { type MirroredType [X ] = IList [X ]; type MirroredMonoType = IList [Any ] ; type MirroredElemTypes [_] <: Tuple }
6
+
7
+ val M = summon[Of ]
8
+ }
9
+
10
+
11
+ trait IListDefn {
12
+ sealed trait IList [A ]
13
+ case class INil [A ]() extends IList [A ]
14
+ case class ICons [A ](h : A , t : IList [A ]) extends IList [A ]
15
+ }
You can’t perform that action at this time.
0 commit comments