File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
414
414
case pre : ThisType =>
415
415
tp.isType ||
416
416
pre.cls.isStaticOwner ||
417
- tp.symbol.isParamOrAccessor && ! pre.cls .is(Trait ) && ctx.owner.enclosingClass == pre.cls
417
+ tp.symbol.isParamOrAccessor && ! tp.symbol.owner .is(Trait ) && ctx.owner.enclosingClass == pre.cls
418
418
// was ctx.owner.enclosingClass.derivesFrom(pre.cls) which was not tight enough
419
419
// and was spuriously triggered in case inner class would inherit from outer one
420
420
// eg anonymous TypeMap inside TypeMap.andThen
Original file line number Diff line number Diff line change
1
+ trait B (val y : Int )
2
+
3
+ class C extends B (20 ) {
4
+ def foo (): Unit = println(y)
5
+ }
You can’t perform that action at this time.
0 commit comments