File tree 3 files changed +12
-1
lines changed
src/dotty/tools/dotc/transform 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,8 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
309
309
local.copySymDenotation(
310
310
owner = newOwner,
311
311
name = newName(local),
312
- initFlags = local.flags &~ InSuperCall | Private | maybeStatic,
312
+ initFlags = local.flags &~ (InSuperCall | Module ) | Private | maybeStatic,
313
+ // drop Module because class is no longer a singleton in the lifted context.
313
314
info = liftedInfo(local)).installAfter(thisTransform)
314
315
if (local.isClass)
315
316
for (member <- local.asClass.info.decls)
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ def main (args : Array [String ]): Unit = {
3
+ object A {
4
+ def a = new A
5
+ def y = 0
6
+ }
7
+ class A { A .y }
8
+ A .a
9
+ }
10
+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments