File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -289,9 +289,12 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
289
289
for ((local, lOwner) <- liftedOwner) {
290
290
val (newOwner, maybeStatic) =
291
291
if (lOwner is Package ) {
292
- if (local.enclosingClass.isStatic) // member of a static object
292
+ // member of a static object
293
+ if (local.enclosingClass.isStatic && local.enclosingClass.isProperlyContainedIn(local.topLevelClass)) {
294
+ // though the second condition seems weird, it's not true for symbols which are defined in some
295
+ // weird combinations of super calls.
293
296
(local.enclosingClass, EmptyFlags )
294
- else
297
+ } else
295
298
(local.topLevelClass, JavaStatic )
296
299
}
297
300
else (lOwner, EmptyFlags )
You can’t perform that action at this time.
0 commit comments