aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
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/core
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/core')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala5
-rw-r--r--src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index a25be0a1f..fb6a40100 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -751,10 +751,7 @@ object SymDenotations {
// def isOverridable: Boolean = !!! need to enforce that classes cannot be redefined
def isSkolem: Boolean = name == nme.SKOLEM
- def isInlineMethod(implicit ctx: Context): Boolean =
- is(Method, butNot = Accessor) &&
- !isCompleting && // don't force method type; recursive inlines are ignored anyway.
- hasAnnotation(defn.InlineAnnot)
+ def isInlineMethod(implicit ctx: Context): Boolean = is(InlineMethod, butNot = Accessor)
// ------ access to related symbols ---------------------------------
diff --git a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
index a0d788955..d2605afea 100644
--- a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
+++ b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
@@ -474,7 +474,7 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table, posUnpickle
sym.completer.withDecls(newScope)
forkAt(templateStart).indexTemplateParams()(localContext(sym))
}
- else if (annots.exists(_.symbol == defn.InlineAnnot))
+ else if (sym.isInlineMethod)
sym.addAnnotation(LazyBodyAnnotation { ctx0 =>
implicit val ctx: Context = localContext(sym)(ctx0).addMode(Mode.ReadPositions)
// avoids space leaks by not capturing the current context