aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/TreeTypeMap.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-15 18:51:55 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:12:28 +0200
commitbef012d32127e3d256d0ce31e1a2a27f7277f8d8 (patch)
treecae40c2211cfece2bfb0312af732ddfaa47c1ac5 /src/dotty/tools/dotc/ast/TreeTypeMap.scala
parentce9efda393055060a73509d1c10b8bdd9f2f0136 (diff)
downloaddotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.tar.gz
dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.tar.bz2
dotty-bef012d32127e3d256d0ce31e1a2a27f7277f8d8.zip
Move logic from InlineInfo to BodyAnnot
Now that we have BodyAnnot, InlineInfo can be eliminated.
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeTypeMap.scala')
-rw-r--r--src/dotty/tools/dotc/ast/TreeTypeMap.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/src/dotty/tools/dotc/ast/TreeTypeMap.scala
index efa46debb..80499cceb 100644
--- a/src/dotty/tools/dotc/ast/TreeTypeMap.scala
+++ b/src/dotty/tools/dotc/ast/TreeTypeMap.scala
@@ -6,7 +6,6 @@ import core._
import Types._, Contexts._, Constants._, Names._, Flags._
import SymDenotations._, Symbols._, Annotations._, Trees._, Symbols._
import Denotations._, Decorators._
-import typer.Inliner
import config.Printers.inlining
import dotty.tools.dotc.transform.SymUtils._
@@ -95,9 +94,9 @@ final class TreeTypeMap(
val (tmap1, tparams1) = transformDefs(ddef.tparams)
val (tmap2, vparamss1) = tmap1.transformVParamss(vparamss)
val res = cpy.DefDef(ddef)(name, tparams1, vparamss1, tmap2.transform(tpt), tmap2.transform(ddef.rhs))
- if (Inliner.hasBodyToInline(res.symbol)) {
- inlining.println(i"update inline body ${res.symbol}")
- Inliner.updateInlineBody(res.symbol, res.rhs)
+ res.symbol.transformAnnotations {
+ case ann: BodyAnnotation => ann.derivedAnnotation(res.rhs)
+ case ann => ann
}
res
case blk @ Block(stats, expr) =>