diff options
author | James Iry <jamesiry@gmail.com> | 2013-03-20 16:08:34 -0700 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-03-20 16:08:34 -0700 |
commit | 241c8c0b6f79436e7cd53b28a18d1db6d2b6b5bb (patch) | |
tree | 53f661c888dea0ebcceb225e8ef2fb41df1d3de0 /src | |
parent | bbd69f5dd1d5b7eb6a90aa7d59df9c491d112d4d (diff) | |
parent | f0468537e8b95d15b81f3480ae24555ddb029d36 (diff) | |
download | scala-241c8c0b6f79436e7cd53b28a18d1db6d2b6b5bb.tar.gz scala-241c8c0b6f79436e7cd53b28a18d1db6d2b6b5bb.tar.bz2 scala-241c8c0b6f79436e7cd53b28a18d1db6d2b6b5bb.zip |
Merge pull request #2269 from retronym/ticket/7259
SI-7259 Fix detection of Java defined Selects
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index ef28837c51..2458fc54e1 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4812,7 +4812,9 @@ trait Typers extends Modes with Adaptations with Tags { if (!reallyExists(sym)) { def handleMissing: Tree = { - if (context.owner.enclosingTopLevelClass.isJavaDefined && name.isTypeName) { + if (context.unit.isJava && name.isTypeName) { + // SI-3120 Java uses the same syntax, A.B, to express selection from the + // value A and from the type A. We have to try both. val tree1 = atPos(tree.pos) { gen.convertToSelectFromType(qual, name) } if (tree1 != EmptyTree) return typed1(tree1, mode, pt) } |