summaryrefslogtreecommitdiff
path: root/test/files/pos/t7551
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-10-28 12:08:55 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2016-10-28 12:08:55 +0200
commitae17256f1dcde4dd82008c6e355604d68d5a07b3 (patch)
tree6eb8e3ce569eaaa41a93fc34c9942f9810012822 /test/files/pos/t7551
parent47050ee4934f5bf78339c5d81583ab445a4318dd (diff)
downloadscala-ae17256f1dcde4dd82008c6e355604d68d5a07b3.tar.gz
scala-ae17256f1dcde4dd82008c6e355604d68d5a07b3.tar.bz2
scala-ae17256f1dcde4dd82008c6e355604d68d5a07b3.zip
For scala classfiles, only parse the scala signature annotation
Skipping other annotations not only saves some cycles / GC, but also prevents some spurious warnings / errors related to cyclic dependencies when parsing annotation arguments refering to members of the class.
Diffstat (limited to 'test/files/pos/t7551')
-rw-r--r--test/files/pos/t7551/A.java9
-rw-r--r--test/files/pos/t7551/T.scala9
-rw-r--r--test/files/pos/t7551/Test.scala5
3 files changed, 23 insertions, 0 deletions
diff --git a/test/files/pos/t7551/A.java b/test/files/pos/t7551/A.java
new file mode 100644
index 0000000000..72aeb40fa0
--- /dev/null
+++ b/test/files/pos/t7551/A.java
@@ -0,0 +1,9 @@
+package p;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface A {
+ Class<?> subInterface();
+}
diff --git a/test/files/pos/t7551/T.scala b/test/files/pos/t7551/T.scala
new file mode 100644
index 0000000000..017926e0e2
--- /dev/null
+++ b/test/files/pos/t7551/T.scala
@@ -0,0 +1,9 @@
+package p
+
+@A(subInterface = classOf[T.S])
+trait T {
+}
+
+object T {
+ private[p] trait S extends T { }
+}
diff --git a/test/files/pos/t7551/Test.scala b/test/files/pos/t7551/Test.scala
new file mode 100644
index 0000000000..c1f529c4b1
--- /dev/null
+++ b/test/files/pos/t7551/Test.scala
@@ -0,0 +1,5 @@
+package p
+
+object Foo {
+ def bar(t: T) { }
+}