aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
index e792518ce..007210926 100644
--- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
+++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
@@ -79,7 +79,8 @@ class ExplicitOuter extends MiniPhaseTransform with InfoTransformer { thisTransf
val isTrait = cls.is(Trait)
if (needsOuterIfReferenced(cls) &&
!needsOuterAlways(cls) &&
- impl.existsSubTree(referencesOuter(cls, _)))
+ (cls.mixins.exists(needsOuterIfReferenced) ||
+ impl.existsSubTree(referencesOuter(cls, _))))
ensureOuterAccessors(cls)
val hasOuterFlag = hasOuter(cls)