diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-03-12 19:54:25 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-04-02 23:23:35 +0200 |
commit | f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a (patch) | |
tree | 5a3033193533085037a7e0c6c1e89d89454c1946 /src/reflect | |
parent | 695c5359d3ffd68c602d14d42ecd23fe31aef3d9 (diff) | |
download | scala-f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a.tar.gz scala-f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a.tar.bz2 scala-f7c9adcd6156a301f3a1cc33f0e07289f44fbf7a.zip |
Add a cautionary comment to TreeSymSubstitutor.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Trees.scala | 5 |
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) |