File tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/transform 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ class ExplicitOuter extends MiniPhaseTransform with InfoTransformer { thisTransf
79
79
val isTrait = cls.is(Trait )
80
80
if (needsOuterIfReferenced(cls) &&
81
81
! needsOuterAlways(cls) &&
82
- (cls.mixins.exists(needsOuterIfReferenced) ||
83
- impl.existsSubTree(referencesOuter(cls, _))))
82
+ impl.existsSubTree(referencesOuter(cls, _)))
84
83
ensureOuterAccessors(cls)
85
84
86
85
val hasOuterFlag = hasOuter(cls)
@@ -187,6 +186,7 @@ object ExplicitOuter {
187
186
private def needsOuterAlways (cls : ClassSymbol )(implicit ctx : Context ): Boolean =
188
187
needsOuterIfReferenced(cls) &&
189
188
(! hasLocalInstantiation(cls) || // needs outer because we might not know whether outer is referenced or not
189
+ cls.mixins.exists(needsOuterIfReferenced) || // needs outer for parent traits
190
190
cls.classInfo.parents.exists(parent => // needs outer to potentially pass along to parent
191
191
needsOuterIfReferenced(parent.classSymbol.asClass)))
192
192
You can’t perform that action at this time.
0 commit comments