aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/annot.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-11-04 15:22:18 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-11-22 20:10:22 +0100
commite2c5fcdf97e351e471e79502aa7d23bd973241ab (patch)
tree13fe309281a1fc8792c42011c8a9db5fd8f09291 /tests/pos/annot.scala
parent32954ba55955f4335bb34007269e3d405faa1780 (diff)
downloaddotty-e2c5fcdf97e351e471e79502aa7d23bd973241ab.tar.gz
dotty-e2c5fcdf97e351e471e79502aa7d23bd973241ab.tar.bz2
dotty-e2c5fcdf97e351e471e79502aa7d23bd973241ab.zip
Java annotations parsing problem
Annotations in java could be compiled as-if array-only annotation had <repeated> arguments constructor. That isn't true for scala. Also, type checking creation of single-element array requires implicit resolution to provide ClassTag. This makes problems while reading deferred annotation.
Diffstat (limited to 'tests/pos/annot.scala')
-rw-r--r--tests/pos/annot.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/pos/annot.scala b/tests/pos/annot.scala
index cda24e05d..ab80aba27 100644
--- a/tests/pos/annot.scala
+++ b/tests/pos/annot.scala
@@ -2,7 +2,11 @@ import java.beans.Transient
class Test {
- @SuppressWarnings(Array("hi")) def foo() = ???
+ @SuppressWarnings(Array("hi")) def foo() = ??? // evalutation of annotation on type cannot be deffered as requires implicit resolution(only generic Array$.apply applies here)
+
+ @SuppressWarnings(Array("hi", "foo")) def foo2() = ??? //can be deffered as there is a non-generic method
+
+// @SuppressWarnings("hi") def foo3() = ??? // can be written in java and is serialized this way in bytecode. doesn't typecheck
@Transient(false) def bar = ???