File tree 1 file changed +5
-3
lines changed
src/dotty/tools/dotc/transform
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -289,13 +289,15 @@ 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
+ val encClass = local.enclosingClass
293
+ val topClass = local.topLevelClass
292
294
// member of a static object
293
- if (local.enclosingClass. isStatic && local.enclosingClass. isProperlyContainedIn(local.topLevelClass )) {
295
+ if (encClass. isStatic && encClass. isProperlyContainedIn(topClass )) {
294
296
// though the second condition seems wierd, it's not true for symbols which are defined in some
295
297
// weird combinations of super calls.
296
- (local.enclosingClass , EmptyFlags )
298
+ (encClass , EmptyFlags )
297
299
} else
298
- (local.topLevelClass , JavaStatic )
300
+ (topClass , JavaStatic )
299
301
}
300
302
else (lOwner, EmptyFlags )
301
303
local.copySymDenotation(
You can’t perform that action at this time.
0 commit comments