File tree 3 files changed +1
-43
lines changed
compiler/src/dotty/tools/dotc/core 3 files changed +1
-43
lines changed Original file line number Diff line number Diff line change @@ -711,11 +711,6 @@ object SymDenotations {
711
711
i """
712
712
| Access to protected $this not permitted because enclosing ${ctx.owner.enclosingClass.showLocated}
713
713
| is not a subclass of ${owner.showLocated} where target is defined """ )
714
- else if (cls.is(Trait ) && ! this .owner.is(Trait ))
715
- fail(
716
- i """
717
- | Access to protected $this not permitted from $cls,
718
- | since traits cannot access protected members of superclasses """ )
719
714
else if (
720
715
! ( isType // allow accesses to types from arbitrary subclasses fixes #4737
721
716
|| pre.derivesFrom(cls)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ package p {
143
143
144
144
trait InnerInner {
145
145
val g = getB
146
- // g.tie(self2.asInstanceOf[g.Node]) -- this would be a static error
146
+ g.tie(self2.asInstanceOf [g.Node ])
147
147
}
148
148
}
149
149
}
You can’t perform that action at this time.
0 commit comments