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 d109796 commit 87a5ab2Copy full SHA for 87a5ab2
src/dotty/tools/dotc/transform/LambdaLift.scala
@@ -289,9 +289,12 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
289
for ((local, lOwner) <- liftedOwner) {
290
val (newOwner, maybeStatic) =
291
if (lOwner is Package) {
292
- if (local.enclosingClass.isStatic) // member of a static object
+ // member of a static object
293
+ if (local.enclosingClass.isStatic && local.enclosingClass.isProperlyContainedIn(local.topLevelClass)) {
294
+ // though the second condition seems wierd, it's not true for symbols which are defined in some
295
+ // weird combinations of super calls.
296
(local.enclosingClass, EmptyFlags)
- else
297
+ } else
298
(local.topLevelClass, JavaStatic)
299
}
300
else (lOwner, EmptyFlags)
0 commit comments