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 3d58ec8 commit 2a62984Copy full SHA for 2a62984
compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
@@ -247,7 +247,8 @@ object ExplicitOuter {
247
248
/** Class constructor needs an outer argument. Can be called only after phase ExplicitOuter. */
249
def needsOuterParam(cls: ClassSymbol)(using Context): Boolean =
250
- !cls.is(Trait) && needsOuterIfReferenced(cls)
+ print(cls.show, needsOuterIfReferenced(cls))
251
+ !cls.is(Trait) && needsOuterIfReferenced(cls) && (cls.is(JavaDefined) || outerAccessor(cls).exists)
252
253
/** Tree references an outer class of `cls` which is not a static owner.
254
*/
0 commit comments