aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast
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/ast
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/ast')
-rw-r--r--src/dotty/tools/dotc/ast/Desugar.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala
index 639dac930..349fbfb2c 100644
--- a/src/dotty/tools/dotc/ast/Desugar.scala
+++ b/src/dotty/tools/dotc/ast/Desugar.scala
@@ -615,8 +615,7 @@ object desugar {
*/
def makeClosure(params: List[ValDef], body: Tree, tpt: Tree = TypeTree(), inlineable: Boolean)(implicit ctx: Context) = {
var mods = synthetic
- if (inlineable)
- mods = mods.withAddedAnnotation(New(ref(defn.InlineAnnotType), Nil).withPos(body.pos))
+ if (inlineable) mods |= Inline
Block(
DefDef(nme.ANON_FUN, Nil, params :: Nil, tpt, body).withMods(mods),
Closure(Nil, Ident(nme.ANON_FUN), EmptyTree))