From 65f6d66bee1423c33b94217681368938212ac69d Mon Sep 17 00:00:00 2001
From: "Paolo G. Giarrusso"
Date: Sun, 26 Aug 2018 14:52:19 +0200
Subject: [PATCH] Requested tests for #2973 fix
See https://github.com/lampepfl/dotty/pull/4932#discussion_r209450910.
---
tests/pos/annotations/MyClass.scala | 7 +++++++
tests/pos/annotations2.scala | 10 ++++++++++
2 files changed, 17 insertions(+)
diff --git a/tests/pos/annotations/MyClass.scala b/tests/pos/annotations/MyClass.scala
index 0081be172b05..4b15286d1683 100644
--- a/tests/pos/annotations/MyClass.scala
+++ b/tests/pos/annotations/MyClass.scala
@@ -2,3 +2,10 @@ class MyClass {
@MyAnnotation(Name="Blah", foBaskaLi = Array(1,2,3))
def method = ???
}
+
+class MyClass2 extends AnyRef @MyAnnotation(Name="Foo", foBaskaLi = Array(1,2,3))
+
+class MyClass3 extends AnyRef @MyAnnotation(Name="Foo", foBaskaLi = Array(1,2,3)) {
+ @MyAnnotation(Name="Blah", foBaskaLi = Array(1,2,3))
+ def method = ???
+}
diff --git a/tests/pos/annotations2.scala b/tests/pos/annotations2.scala
index 3bce7f8ac4e2..756c3fe70a59 100644
--- a/tests/pos/annotations2.scala
+++ b/tests/pos/annotations2.scala
@@ -29,3 +29,13 @@ class A3 {
@CAnn[Int](classOf[Int]) val b3 = null
@CAnn[Int]((1, 2)) val b4 = null
}
+
+class B1 extends AnyRef @BAnn((1, 2, 3))
+class B2 extends AnyRef @BAnn((1, 2))
+class B3 extends AnyRef @BAnn[Int]((1, 2, 3))
+class B4 extends AnyRef @BAnn[Int]((1, 2))
+
+class C1 extends AnyRef @CAnn((1, 2))
+class C2 extends AnyRef @CAnn(classOf[Int])
+class C3 extends AnyRef @CAnn[Int]((1, 2))
+class C4 extends AnyRef @CAnn[Int](classOf[Int])