summaryrefslogtreecommitdiff
path: root/test/files/run/t8190.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2014-01-28 19:37:59 +0300
committerEugene Burmako <xeno.by@gmail.com>2014-02-14 14:19:44 +0100
commit0268e03cb461b0c7e8ae2082894988395fc0994a (patch)
tree7dec4c177aad62a2209601a0f5327e243c3340b2 /test/files/run/t8190.scala
parentc7fd03900b7023967f22932f1f32b98d57983e9b (diff)
downloadscala-0268e03cb461b0c7e8ae2082894988395fc0994a.tar.gz
scala-0268e03cb461b0c7e8ae2082894988395fc0994a.tar.bz2
scala-0268e03cb461b0c7e8ae2082894988395fc0994a.zip
SI-8118 simplifies Annotation down to a plain Tree
As per https://groups.google.com/forum/#!topic/scala-internals/8v2UL-LR9yY, annotations don’t have to be represented as AnnotationInfos and can be reduced to plain Trees. Due to compatibility reasons and because of the limitations of the cake pattern used in implementing current version of Reflection, we can’t just say `type Annotation = Tree`, however what we can definitely do is to deprecate all the methods on Annotation and expose `tree: Tree` instead.
Diffstat (limited to 'test/files/run/t8190.scala')
-rw-r--r--test/files/run/t8190.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/files/run/t8190.scala b/test/files/run/t8190.scala
index f8abb73f15..012d0ad347 100644
--- a/test/files/run/t8190.scala
+++ b/test/files/run/t8190.scala
@@ -4,10 +4,6 @@ trait Overloads {
// makes sure noone erases to Any or AnyRef
def test(x: AnyRef) = "AnyRef"
def test(x: Annotation) = "Annotation"
- def test(x: JavaArgument) = "JavaArgument"
- def test(x: LiteralArgument) = "LiteralArgument"
- def test(x: ArrayArgument) = "ArrayArgument"
- def test(x: NestedArgument) = "NestedArgument"
def test(x: Constant) = "Constant"
def test(x: Mirror) = "Mirror"
def test(x: Name) = "Name"
@@ -110,14 +106,14 @@ object Test extends App with Overloads {
types = types.filter(_ != "ModifiersCreator") // type ModifiersCreator = ModifiersExtractor
types = types.filter(_ != "FlagSet") // type FlagSet
types = types.filter(_ != "RuntimeClass") // type RuntimeClass = java.lang.Class[_]
+ types = types.filter(_ != "JavaArgument") // deprecated
+ types = types.filter(_ != "LiteralArgument") // deprecated
+ types = types.filter(_ != "ArrayArgument") // deprecated
+ types = types.filter(_ != "NestedArgument") // deprecated
val diff = types.toList diff buf.toList
println("uncovered type members: " + diff)
}
record(test(null: Annotation))
- record(test(null: JavaArgument))
- record(test(null: LiteralArgument))
- record(test(null: ArrayArgument))
- record(test(null: NestedArgument))
record(test(null: Constant))
record(test(null: Mirror))
record(test(null: Name))