diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-08-09 15:04:33 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-08-09 15:04:33 +0200 |
commit | a1a35c92207c78bfefb95bb1265b3a2968d52d90 (patch) | |
tree | 7b7b8fe4622caf47291f501b48f8f80b4dfbfc1f | |
parent | 2ada4ccf81a4c81e350287a40ac1ac35ab63b2a1 (diff) | |
download | dotty-a1a35c92207c78bfefb95bb1265b3a2968d52d90.tar.gz dotty-a1a35c92207c78bfefb95bb1265b3a2968d52d90.tar.bz2 dotty-a1a35c92207c78bfefb95bb1265b3a2968d52d90.zip |
Fix SelectStatic: do not lift java statics to free idents.
-rw-r--r-- | src/dotty/tools/dotc/transform/SelectStatic.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/SelectStatic.scala b/src/dotty/tools/dotc/transform/SelectStatic.scala index a53184e57..5810d18ca 100644 --- a/src/dotty/tools/dotc/transform/SelectStatic.scala +++ b/src/dotty/tools/dotc/transform/SelectStatic.scala @@ -31,7 +31,9 @@ class SelectStatic extends MiniPhaseTransform with IdentityDenotTransformer { th sym.hasAnnotation(ctx.definitions.ScalaStaticAnnot) ) ) - Block(List(tree.qualifier), ref(sym)) + if (!tree.qualifier.symbol.is(JavaModule)) + Block(List(tree.qualifier), ref(sym)) + else tree else tree } } |