Skip to content

Commit 1c590f7

Browse files
committed
Start search at owner
1 parent 63b7598 commit 1c590f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ object ExplicitOuter {
221221
private def hasLocalInstantiation(cls: ClassSymbol)(using Context): Boolean =
222222
// Modules are normally locally instantiated, except if they are declared in a trait,
223223
// in which case they will be instantiated in the classes that mix in the trait.
224-
cls.ownersIterator.takeWhile(!_.isStatic).exists(_.isTerm)
224+
cls.owner.ownersIterator.takeWhile(!_.isStatic).exists(_.isTerm)
225225
|| cls.is(Private, butNot = Module)
226226
|| cls.is(Module) && !cls.owner.is(Trait)
227227

0 commit comments

Comments
 (0)