diff options
author | Paul Phillips <paulp@improving.org> | 2011-04-30 20:01:48 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-04-30 20:01:48 +0000 |
commit | 8182349189250b0da92e566e11e5a59ac22ca805 (patch) | |
tree | 8d0f13e54ab7018ba37b9ad33d2c0ad70baeddd3 /src/compiler/scala/tools/nsc/typechecker/Namers.scala | |
parent | b4749d3b1afb1df236ec48fd3a773aab24a6f74d (diff) | |
download | scala-8182349189250b0da92e566e11e5a59ac22ca805.tar.gz scala-8182349189250b0da92e566e11e5a59ac22ca805.tar.bz2 scala-8182349189250b0da92e566e11e5a59ac22ca805.zip |
A few minor cleanups involving logging messages...
A few minor cleanups involving logging messages, assertion messages,
compiler warnings, and other innocuous matters. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index b0cfa6a559..8f20f2a120 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1239,8 +1239,14 @@ trait Namers { self: Analyzer => case ImportSelector(from, _, to, _) :: rest => if (from != nme.WILDCARD && base != ErrorType) { isValidSelector(from) { - if (currentRun.compileSourceFor(expr, from)) - return typeSig(tree) + if (currentRun.compileSourceFor(expr, from)) { + // XXX This used to be "return typeSig(tree)" but since this method + // returns Unit, that is deceptive at best. Just in case it is side-effecting + // somehow, I left the call in before the return; if you know it is + // not side effecting, please delete the call. + typeSig(tree) + return + } def notMember = context.error(tree.pos, from.decode + " is not a member of " + expr) // for Java code importing Scala objects |