We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63b7598 commit 1c590f7Copy full SHA for 1c590f7
compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
@@ -221,7 +221,7 @@ object ExplicitOuter {
221
private def hasLocalInstantiation(cls: ClassSymbol)(using Context): Boolean =
222
// Modules are normally locally instantiated, except if they are declared in a trait,
223
// in which case they will be instantiated in the classes that mix in the trait.
224
- cls.ownersIterator.takeWhile(!_.isStatic).exists(_.isTerm)
+ cls.owner.ownersIterator.takeWhile(!_.isStatic).exists(_.isTerm)
225
|| cls.is(Private, butNot = Module)
226
|| cls.is(Module) && !cls.owner.is(Trait)
227
0 commit comments