aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-10 12:15:11 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:11:21 +0200
commit6bf7768e4e2e604f93f27efacf28d076d97ac951 (patch)
tree9ec884f01ceca96ccab2525dbcafa361c7a46bfd /src/dotty/tools/dotc/typer/Namer.scala
parentd1b933cac3380edcade3891aec6ed731744b2e13 (diff)
downloaddotty-6bf7768e4e2e604f93f27efacf28d076d97ac951.tar.gz
dotty-6bf7768e4e2e604f93f27efacf28d076d97ac951.tar.bz2
dotty-6bf7768e4e2e604f93f27efacf28d076d97ac951.zip
Refactoring for registering InlineInfo
Now it's done on the symbol directly rather than its inline annotation. This simplifies client code and keeps the implementaion how inline infos should be assocated with inline methods open.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 6f730a585..5e2ff4164 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -566,17 +566,17 @@ class Namer { typer: Typer =>
val cls = typedAheadAnnotation(annotTree)
val ann = Annotation.deferred(cls, implicit ctx => typedAnnotation(annotTree))
denot.addAnnotation(ann)
- if (cls == defn.InlineAnnot) addInlineInfo(denot.symbol, ann, original)
+ if (cls == defn.InlineAnnot) addInlineInfo(denot, original)
}
case _ =>
}
- private def addInlineInfo(inlineMethod: Symbol, inlineAnnot: Annotation, original: untpd.Tree) = original match {
+ private def addInlineInfo(denot: SymDenotation, original: untpd.Tree) = original match {
case original: untpd.DefDef =>
- Inliner.attachInlineInfo(
- inlineAnnot,
+ Inliner.registerInlineInfo(
+ denot,
implicit ctx => typedAheadExpr(original).asInstanceOf[tpd.DefDef].rhs
- )(localContext(inlineMethod))
+ )(localContext(denot.symbol))
case _ =>
}