aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Annotations.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Annotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Annotations.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Annotations.scala b/src/dotty/tools/dotc/core/Annotations.scala
index 3c8e02d8f..ff05c9faa 100644
--- a/src/dotty/tools/dotc/core/Annotations.scala
+++ b/src/dotty/tools/dotc/core/Annotations.scala
@@ -9,6 +9,9 @@ object Annotations {
def symbol(implicit ctx: Context): Symbol = tree.tpe.typeSymbol
def matches(cls: Symbol)(implicit ctx: Context): Boolean = symbol.isNonBottomSubClass(cls)
def appliesToModule: Boolean = true // for now; see remark in SymDenotations
+
+ def derivedAnnotation(tree: Tree) =
+ if (tree eq this.tree) this else Annotation(tree)
}
case class ConcreteAnnotation(val tree: Tree) extends Annotation
@@ -42,12 +45,6 @@ object Annotations {
apply(defn.ChildAnnot, List(Ident(NamedType(sym.owner.thisType, sym.name))))
}
- def makeLiteralAnnotArg(const: Constant): Tree = ???
-
- def makeArrayAnnotArg(elems: Array[Tree]): Tree = ???
-
- def makeNestedAnnotArg(annot: Annotation): Tree = annot.tree
-
def ThrowsAnnotation(cls: ClassSymbol)(implicit ctx: Context) =
Annotation(defn.ThrowsAnnot, Ident(cls.symbolicRef))
} \ No newline at end of file