summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-04-14 10:45:17 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-04-14 14:04:42 +0200
commit540535f71e2b4141db9294b8c2b053319a216084 (patch)
tree1a85417cb053aca7662981f65474fd54a4affd66 /test
parent470a51285b686b0f0e0149d1741f76b03ecab310 (diff)
downloadscala-540535f71e2b4141db9294b8c2b053319a216084.tar.gz
scala-540535f71e2b4141db9294b8c2b053319a216084.tar.bz2
scala-540535f71e2b4141db9294b8c2b053319a216084.zip
SI-8497 Fix regression in pickling of AnnotatedTypes
Fixes an inconsistency introduced in these two spots: https://github.com/scala/scala/pull/3033/files#diff-6ce1a17ebee31068f41c36a8a2b3bc9aR79 https://github.com/scala/scala/pull/3033/files#diff-c455cb229f5227b1bcaa1544478fe3acR452 The bug shows up when pickling then unpickling an AnnotatedType that has only non-static annotations.
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t8497/A_1.scala13
-rw-r--r--test/files/pos/t8497/B_2.scala1
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/pos/t8497/A_1.scala b/test/files/pos/t8497/A_1.scala
new file mode 100644
index 0000000000..6a76b0ee99
--- /dev/null
+++ b/test/files/pos/t8497/A_1.scala
@@ -0,0 +1,13 @@
+package p {
+ object Crash {
+ def e(s: (String @java.lang.Deprecated)): Unit = ()
+ def f(s: (String @nonStatic)): Unit = ()
+ }
+ object Ok {
+ def g(s: (String @nonStatic @static)): Unit = ()
+ def h(s: (String @static)): Unit = ()
+ }
+}
+
+class nonStatic extends scala.annotation.Annotation
+class static extends scala.annotation.StaticAnnotation
diff --git a/test/files/pos/t8497/B_2.scala b/test/files/pos/t8497/B_2.scala
new file mode 100644
index 0000000000..efe2edf2c3
--- /dev/null
+++ b/test/files/pos/t8497/B_2.scala
@@ -0,0 +1 @@
+package p { object Test { Crash } }