From 6bf7768e4e2e604f93f27efacf28d076d97ac951 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 10 Sep 2016 12:15:11 +0200 Subject: Refactoring for registering InlineInfo Now it's done on the symbol directly rather than its inline annotation. This simplifies client code and keeps the implementaion how inline infos should be assocated with inline methods open. --- src/dotty/tools/dotc/core/SymDenotations.scala | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala') diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 977c76668..9381f45dd 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -281,6 +281,15 @@ object SymDenotations { case nil => None } + /** The same as getAnnotation, but without ensuring + * that the symbol carrying the annotation is completed + */ + final def unforcedAnnotation(cls: Symbol)(implicit ctx: Context): Option[Annotation] = + dropOtherAnnotations(myAnnotations, cls) match { + case annot :: _ => Some(annot) + case nil => None + } + /** Add given annotation to the annotations of this denotation */ final def addAnnotation(annot: Annotation): Unit = annotations = annot :: myAnnotations -- cgit v1.2.3