Skip to content

Commit a1a35c9

Browse files
committed
Fix SelectStatic: do not lift java statics to free idents.
1 parent 2ada4cc commit a1a35c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/transform/SelectStatic.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class SelectStatic extends MiniPhaseTransform with IdentityDenotTransformer { th
3131
sym.hasAnnotation(ctx.definitions.ScalaStaticAnnot)
3232
)
3333
)
34-
Block(List(tree.qualifier), ref(sym))
34+
if (!tree.qualifier.symbol.is(JavaModule))
35+
Block(List(tree.qualifier), ref(sym))
36+
else tree
3537
else tree
3638
}
3739
}

0 commit comments

Comments
 (0)