summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-04-30 20:01:48 +0000
committerPaul Phillips <paulp@improving.org>2011-04-30 20:01:48 +0000
commit8182349189250b0da92e566e11e5a59ac22ca805 (patch)
tree8d0f13e54ab7018ba37b9ad33d2c0ad70baeddd3 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parentb4749d3b1afb1df236ec48fd3a773aab24a6f74d (diff)
downloadscala-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.scala10
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