From 2e02b292cca07f8b619aba0e03dca878e22c415f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 7 Nov 2016 18:42:17 +0100 Subject: Separate addInlineInfo and addAnnotations --- src/dotty/tools/dotc/typer/Namer.scala | 6 +++--- 1 file 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) } -- cgit v1.2.3