aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-07 18:42:17 +0100
committerMartin Odersky <odersky@gmail.com>2016-11-07 18:42:17 +0100
commit2e02b292cca07f8b619aba0e03dca878e22c415f (patch)
tree5f620093484a5b73b2503bd37d1b2962136d7330 /src/dotty/tools/dotc/typer/Namer.scala
parent678242f86cf8bc50cd15656f3b1058f711e0e3d8 (diff)
downloaddotty-2e02b292cca07f8b619aba0e03dca878e22c415f.tar.gz
dotty-2e02b292cca07f8b619aba0e03dca878e22c415f.tar.bz2
dotty-2e02b292cca07f8b619aba0e03dca878e22c415f.zip
Separate addInlineInfo and addAnnotations
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 405cf73b5..dd7326fae 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -570,13 +570,12 @@ class Namer { typer: Typer =>
denot.addAnnotation(ann)
if (cls == defn.InlineAnnot && denot.is(Method, butNot = Accessor))
denot.setFlag(Inline)
- if (denot.isInlineMethod) addInlineInfo(denot, original)
}
case _ =>
}
- private def addInlineInfo(denot: SymDenotation, original: untpd.Tree) = original match {
- case original: untpd.DefDef =>
+ private def addInlineInfo(denot: SymDenotation) = original match {
+ case original: untpd.DefDef if denot.isInlineMethod =>
Inliner.registerInlineInfo(
denot,
implicit ctx => typedAheadExpr(original).asInstanceOf[tpd.DefDef].rhs
@@ -589,6 +588,7 @@ class Namer { typer: Typer =>
*/
def completeInCreationContext(denot: SymDenotation): Unit = {
addAnnotations(denot)
+ addInlineInfo(denot)
denot.info = typeSig(denot.symbol)
Checking.checkWellFormed(denot.symbol)
}