summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMiles Sabin <miles@milessabin.com>2009-10-07 22:12:48 +0000
committerMiles Sabin <miles@milessabin.com>2009-10-07 22:12:48 +0000
commit611e5bd1f93bc04d7a699be376b53f3505b9414a (patch)
tree3ff4cbc843fcf09c54412655c7462576f137521c /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parenta8272bce60fae53d9164fbc7660f61bc56e6b2c0 (diff)
downloadscala-611e5bd1f93bc04d7a699be376b53f3505b9414a.tar.gz
scala-611e5bd1f93bc04d7a699be376b53f3505b9414a.tar.bz2
scala-611e5bd1f93bc04d7a699be376b53f3505b9414a.zip
Retains Import nodes until the typers phase so ...
Retains Import nodes until the typers phase so that they are available to interactive compiler clients and other AST users. Adds position information to imported names and renames.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index df17dcc416..68f6009127 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1830,8 +1830,9 @@ trait Typers { self: Analyzer =>
if (imp0 ne null) {
context = context.makeNewImport(imp0)
imp0.symbol.initialize
- }
- EmptyTree
+ imp0
+ } else
+ EmptyTree
case _ =>
if (localTarget && !includesTargetPos(stat)) {
stat