diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-19 22:58:13 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-19 22:58:13 +0100 |
commit | b3af6169d06796f3ac57d7082bc9eaeb0db34155 (patch) | |
tree | cf39f8eec2e1520331aff518c72a4abdf48a4974 /tests/pos/annot.scala | |
parent | 13ec91b955b5c10da750b26e10f793ea44a72945 (diff) | |
download | dotty-b3af6169d06796f3ac57d7082bc9eaeb0db34155.tar.gz dotty-b3af6169d06796f3ac57d7082bc9eaeb0db34155.tar.bz2 dotty-b3af6169d06796f3ac57d7082bc9eaeb0db34155.zip |
Allow for varargs passed to Java annotation constructors.
Diffstat (limited to 'tests/pos/annot.scala')
-rw-r--r-- | tests/pos/annot.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/pos/annot.scala b/tests/pos/annot.scala index ab80aba27..dbce73005 100644 --- a/tests/pos/annot.scala +++ b/tests/pos/annot.scala @@ -2,11 +2,13 @@ import java.beans.Transient class Test { - @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")) def foo() = ??? // evalutation of annotation on type cannot be deferred 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(Array("hi", "foo")) def foo2() = ??? //can be deferred 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 + @SuppressWarnings("hi") def foo() = ??? // array arguments may also be passed as varargs + + // @SuppressWarnings("hi") def foo3() = ??? // can be written in java and is serialized this way in bytecode. doesn't typecheck @Transient(false) def bar = ??? |