diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-03-29 11:02:34 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-03-29 18:34:36 +1000 |
commit | 7e57bcc1818a402ad6ec32416af2b4522671f9ab (patch) | |
tree | b3689186310539bb916f1ab9aa247599eca49b88 /test/files | |
parent | 5b11d3ecad2803a0d0cb81a7a29faf0a4389a6b3 (diff) | |
download | scala-7e57bcc1818a402ad6ec32416af2b4522671f9ab.tar.gz scala-7e57bcc1818a402ad6ec32416af2b4522671f9ab.tar.bz2 scala-7e57bcc1818a402ad6ec32416af2b4522671f9ab.zip |
Java types and type parameters can be annotated since JSR 308
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/java-type-annotations/NotNull.java | 6 | ||||
-rw-r--r-- | test/files/pos/java-type-annotations/Test.java | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/java-type-annotations/NotNull.java b/test/files/pos/java-type-annotations/NotNull.java new file mode 100644 index 0000000000..2716fe1a99 --- /dev/null +++ b/test/files/pos/java-type-annotations/NotNull.java @@ -0,0 +1,6 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) +public @interface NotNull { +} diff --git a/test/files/pos/java-type-annotations/Test.java b/test/files/pos/java-type-annotations/Test.java new file mode 100644 index 0000000000..d6bda1dedb --- /dev/null +++ b/test/files/pos/java-type-annotations/Test.java @@ -0,0 +1,4 @@ +public class Test { + static class C<@NotNull T> {}; + @NotNull String foo() { return ""; } +} |