summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Trees.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-03-12 19:54:25 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-04-02 23:23:35 +0200
commitf7c9adcd6156a301f3a1cc33f0e07289f44fbf7a (patch)
tree5a3033193533085037a7e0c6c1e89d89454c1946 /src/reflect/scala/reflect/internal/Trees.scala
parent695c5359d3ffd68c602d14d42ecd23fe31aef3d9 (diff)
downloadscala-f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a.tar.gz
scala-f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a.tar.bz2
scala-f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a.zip
Add a cautionary comment to TreeSymSubstitutor.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Trees.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Trees.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Trees.scala b/src/reflect/scala/reflect/internal/Trees.scala
index 754adcb80d..2585b541ed 100644
--- a/src/reflect/scala/reflect/internal/Trees.scala
+++ b/src/reflect/scala/reflect/internal/Trees.scala
@@ -1434,6 +1434,11 @@ trait Trees extends api.Trees { self: SymbolTable =>
/** Substitute symbols in `from` with symbols in `to`. Returns a new
* tree using the new symbols and whose Ident and Select nodes are
* name-consistent with the new symbols.
+ *
+ * Note: This is currently a destructive operation on the original Tree.
+ * Trees currently assigned a symbol in `from` will be assigned the new symbols
+ * without copying, and trees that define symbols with an `info` that refer
+ * a symbol in `from` will have a new type assigned.
*/
class TreeSymSubstituter(from: List[Symbol], to: List[Symbol]) extends Transformer {
val symSubst = new SubstSymMap(from, to)