aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-07 17:05:14 +0100
committerMartin Odersky <odersky@gmail.com>2016-11-07 17:05:14 +0100
commit0d9dd7c7e366be71ca795b89b48def8b0d201a05 (patch)
tree226f41da3259288722cb6bc0a429ffb084690416 /src/dotty/tools/dotc/typer/Typer.scala
parent913f76a482efc733c01dd262a72de78e795d4b7b (diff)
downloaddotty-0d9dd7c7e366be71ca795b89b48def8b0d201a05.tar.gz
dotty-0d9dd7c7e366be71ca795b89b48def8b0d201a05.tar.bz2
dotty-0d9dd7c7e366be71ca795b89b48def8b0d201a05.zip
Use inline flag instead of @inline annotation
Convert `@inline` annotations to `inline` flags, not the other way round as was done before.
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