summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-07-06 11:44:51 +0000
committerMartin Odersky <odersky@gmail.com>2011-07-06 11:44:51 +0000
commit2c28fc4afa6471fa4059fea674043081ab796423 (patch)
treed14bad13ce9b29c8aedd4d1e82ab52c8c1780322 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent124e2f95aee0085b5df1af899008a63a762bece6 (diff)
downloadscala-2c28fc4afa6471fa4059fea674043081ab796423.tar.gz
scala-2c28fc4afa6471fa4059fea674043081ab796423.tar.bz2
scala-2c28fc4afa6471fa4059fea674043081ab796423.zip
Fix to handling of imports in namers to make ID...
Fix to handling of imports in namers to make IDE structure building work correctly.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index c0160d5d34..1ea41ff928 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -1278,6 +1278,9 @@ trait Namers { self: Analyzer =>
}
checkSelectors(selectors)
transformed(tree) = treeCopy.Import(tree, expr1, selectors)
+ expr.symbol = expr1.symbol // copy symbol and type attributes back into old expression
+ // so that the structure builder will find it.
+ expr.tpe = expr1.tpe
ImportType(expr1)
}
} catch {