diff options
author | Paul Phillips <paulp@improving.org> | 2012-12-12 16:05:24 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-12-19 11:51:54 -0800 |
commit | 9e88ddf82e2d8aa779aab46aec284d5566deac14 (patch) | |
tree | 34bd76cde8ab906d36970a69ac73310d412193b8 /src/compiler/scala/tools/nsc/typechecker/Namers.scala | |
parent | 7c23d525ccb413d8ff3e4cc6b442e7e864608609 (diff) | |
download | scala-9e88ddf82e2d8aa779aab46aec284d5566deac14.tar.gz scala-9e88ddf82e2d8aa779aab46aec284d5566deac14.tar.bz2 scala-9e88ddf82e2d8aa779aab46aec284d5566deac14.zip |
Eliminating var-like setter tpe_= on Tree.
Deprecated tpe_= on Tree, which is redundant with and
less useful than setType. To provide a small layer of
insulation from the direct nulling out of mutable fields
used to signal the typer, added def clearType() which is
merely tree.tpe = null but is shamefaced about the null
and var-settings parts like a respectable method should be.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 9a32747c3a..d524c88f43 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1361,8 +1361,7 @@ trait Namers extends MethodSynthesis { transformed(tree) = newImport // copy symbol and type attributes back into old expression // so that the structure builder will find it. - expr.symbol = expr1.symbol - expr.tpe = expr1.tpe + expr setSymbol expr1.symbol setType expr1.tpe ImportType(expr1) } } |