File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,9 @@ object Checking {
206
206
def isInteresting (prefix : Type ): Boolean = prefix.stripTypeVar match {
207
207
case NoPrefix => true
208
208
case prefix : ThisType => sym.owner.isClass && prefix.cls.isContainedIn(sym.owner)
209
- case prefix : NamedType => ! prefix.symbol.isStaticOwner && isInteresting(prefix.prefix)
209
+ case prefix : NamedType =>
210
+ ! prefix.symbol.isStaticOwner &&
211
+ (pre.derivesFrom(sym.owner) || isInteresting(prefix.prefix))
210
212
case SuperType (thistp, _) => isInteresting(thistp)
211
213
case AndType (tp1, tp2) => isInteresting(tp1) || isInteresting(tp2)
212
214
case OrType (tp1, tp2) => isInteresting(tp1) && isInteresting(tp2)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class C {
23
23
24
24
class E {
25
25
class F {
26
- type T <: x.type // old- error: not stable
26
+ type T <: x.type // error
27
27
val z : x.type = ??? // old-error: not stable
28
28
}
29
29
lazy val x : F # T = ???
Original file line number Diff line number Diff line change
1
+ class Base {
2
+ type A = { // error
3
+ val m : Foo .A
4
+ }
5
+ }
6
+
7
+ object Foo extends Base
You can’t perform that action at this time.
0 commit comments