summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-09 18:30:23 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-18 11:14:37 +1000
commita77f01f546312cf6601f03794f909a09d34c5445 (patch)
treedcf3859e10c4bf8d53052222bfb7fff1c23be253 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala
parent90a98f7c41cfcfdb60dc25db5ac33d0d0ff10f99 (diff)
downloadscala-a77f01f546312cf6601f03794f909a09d34c5445.tar.gz
scala-a77f01f546312cf6601f03794f909a09d34c5445.tar.bz2
scala-a77f01f546312cf6601f03794f909a09d34c5445.zip
SI-5639 Predicate bug fix on -Xsource:2.12
To be conservative, I've predicated this fix in `-Xsource:2.12`. This is done in separate commit to show that the previous fix passes the test suite, rather than just tests with `-Xsource:2.12`.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index acd8a6ea7b..b13f9e94cc 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -798,7 +798,7 @@ trait Contexts { self: Analyzer =>
isAccessible(sym, pre) &&
!(imported && {
val e = scope.lookupEntry(name)
- (e ne null) && (e.owner == scope) && e.sym.exists
+ (e ne null) && (e.owner == scope) && (!settings.isScala212 || e.sym.exists)
})
private def collectImplicits(syms: Scope, pre: Type, imported: Boolean = false): List[ImplicitInfo] =