diff options
author | Martin Odersky <odersky@gmail.com> | 2011-04-13 15:07:21 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-04-13 15:07:21 +0000 |
commit | 514d01c1ce9219a10f37d50a39cfeb420d76e38c (patch) | |
tree | f63d82982a4973ab8117b7dcc0730b3723a8264f /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 703bbdae73800e49d737e133e3a05929005294fc (diff) | |
download | scala-514d01c1ce9219a10f37d50a39cfeb420d76e38c.tar.gz scala-514d01c1ce9219a10f37d50a39cfeb420d76e38c.tar.bz2 scala-514d01c1ce9219a10f37d50a39cfeb420d76e38c.zip |
Fixes my part of #4283 by inserting another cas...
Fixes my part of #4283 by inserting another cast pre-emptively when an
IllegalAccess error is possible in an erasure-inserted cast. Review by
extempore.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index eb9eb9dbec..7567cf6483 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -383,7 +383,7 @@ trait Contexts { self: Analyzer => * @param superAccess ... * @return ... */ - def isAccessible(sym: Symbol, pre: Type, superAccess: Boolean): Boolean = { + def isAccessible(sym: Symbol, pre: Type, superAccess: Boolean = false): Boolean = { lastAccessCheckDetails = "" // Console.println("isAccessible(%s, %s, %s)".format(sym, pre, superAccess)) @@ -507,7 +507,7 @@ trait Contexts { self: Analyzer => */ private def isQualifyingImplicit(sym: Symbol, pre: Type, imported: Boolean) = sym.isImplicit && - isAccessible(sym, pre, false) && + isAccessible(sym, pre) && !(imported && { val e = scope.lookupEntry(sym.name) (e ne null) && (e.owner == scope) |