Skip to content

Commit 2e02b29

Browse files
committed
Separate addInlineInfo and addAnnotations
1 parent 678242f commit 2e02b29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,13 +570,12 @@ class Namer { typer: Typer =>
570570
denot.addAnnotation(ann)
571571
if (cls == defn.InlineAnnot && denot.is(Method, butNot = Accessor))
572572
denot.setFlag(Inline)
573-
if (denot.isInlineMethod) addInlineInfo(denot, original)
574573
}
575574
case _ =>
576575
}
577576

578-
private def addInlineInfo(denot: SymDenotation, original: untpd.Tree) = original match {
579-
case original: untpd.DefDef =>
577+
private def addInlineInfo(denot: SymDenotation) = original match {
578+
case original: untpd.DefDef if denot.isInlineMethod =>
580579
Inliner.registerInlineInfo(
581580
denot,
582581
implicit ctx => typedAheadExpr(original).asInstanceOf[tpd.DefDef].rhs
@@ -589,6 +588,7 @@ class Namer { typer: Typer =>
589588
*/
590589
def completeInCreationContext(denot: SymDenotation): Unit = {
591590
addAnnotations(denot)
591+
addInlineInfo(denot)
592592
denot.info = typeSig(denot.symbol)
593593
Checking.checkWellFormed(denot.symbol)
594594
}

0 commit comments

Comments
 (0)