aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-11-10 12:07:24 +0100
committerGitHub <noreply@github.com>2016-11-10 12:07:24 +0100
commit28c2e04dd33b6389a44460f977a97b8691265994 (patch)
treee138f794cd484509e8379934b5c538b5fa15d455 /src/dotty/tools/dotc/typer/Typer.scala
parentab652d191652eb471e0d7511e1a831f5a52b75fe (diff)
parent2e02b292cca07f8b619aba0e03dca878e22c415f (diff)
downloaddotty-28c2e04dd33b6389a44460f977a97b8691265994.tar.gz
dotty-28c2e04dd33b6389a44460f977a97b8691265994.tar.bz2
dotty-28c2e04dd33b6389a44460f977a97b8691265994.zip
Merge pull request #1677 from dotty-staging/fix-#1647
Use inline flag instead of @inline annotation
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 95f0c5614..a93262314 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1142,7 +1142,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
}
val vdef1 = assignType(cpy.ValDef(vdef)(name, tpt1, rhs1), sym)
if (sym.is(Inline, butNot = DeferredOrParamAccessor))
- checkInlineConformant(rhs1, "right-hand side of inline value")
+ checkInlineConformant(rhs1, em"right-hand side of inline $sym")
patchIfLazy(vdef1)
vdef1
}
@@ -1176,8 +1176,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val rhs1 = typedExpr(ddef.rhs, tpt1.tpe)(rhsCtx)
// Overwrite inline body to make sure it is not evaluated twice
- if (sym.hasAnnotation(defn.InlineAnnot))
- Inliner.registerInlineInfo(sym, _ => rhs1)
+ if (sym.isInlineMethod) Inliner.registerInlineInfo(sym, _ => rhs1)
if (sym.isAnonymousFunction) {
// If we define an anonymous function, make sure the return type does not