Skip to content

Commit 2a62984

Browse files
committed
try to fix test
1 parent 3d58ec8 commit 2a62984

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ object ExplicitOuter {
247247

248248
/** Class constructor needs an outer argument. Can be called only after phase ExplicitOuter. */
249249
def needsOuterParam(cls: ClassSymbol)(using Context): Boolean =
250-
!cls.is(Trait) && needsOuterIfReferenced(cls)
250+
print(cls.show, needsOuterIfReferenced(cls))
251+
!cls.is(Trait) && needsOuterIfReferenced(cls) && (cls.is(JavaDefined) || outerAccessor(cls).exists)
251252

252253
/** Tree references an outer class of `cls` which is not a static owner.
253254
*/

0 commit comments

Comments
 (0)