aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/TreeTypeMap.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-15 18:08:10 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:12:28 +0200
commit95e488eab2a686671b2a6ffd8fce05c043b3afab (patch)
tree397e7af116478809048f82b5469e6d7101b160ca /src/dotty/tools/dotc/ast/TreeTypeMap.scala
parent5a46d19dde76b739f6672c9b6f57355cfd38159a (diff)
downloaddotty-95e488eab2a686671b2a6ffd8fce05c043b3afab.tar.gz
dotty-95e488eab2a686671b2a6ffd8fce05c043b3afab.tar.bz2
dotty-95e488eab2a686671b2a6ffd8fce05c043b3afab.zip
Use BodyAnnot to indicate rhs of inline method
Since fundamental operations such as treeCopy have to know about inline bodies, it seems better to represent this information directly in an annotation.
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeTypeMap.scala')
-rw-r--r--src/dotty/tools/dotc/ast/TreeTypeMap.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/src/dotty/tools/dotc/ast/TreeTypeMap.scala
index 6d0c7d8e3..efa46debb 100644
--- a/src/dotty/tools/dotc/ast/TreeTypeMap.scala
+++ b/src/dotty/tools/dotc/ast/TreeTypeMap.scala
@@ -138,10 +138,7 @@ final class TreeTypeMap(
def apply[ThisTree <: tpd.Tree](tree: ThisTree): ThisTree = transform(tree).asInstanceOf[ThisTree]
- def apply(annot: Annotation): Annotation = {
- val tree1 = apply(annot.tree)
- if (tree1 eq annot.tree) annot else ConcreteAnnotation(tree1)
- }
+ def apply(annot: Annotation): Annotation = annot.derivedAnnotation(apply(annot.tree))
/** The current tree map composed with a substitution [from -> to] */
def withSubstitution(from: List[Symbol], to: List[Symbol]): TreeTypeMap =