diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-08-18 23:12:17 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-08-18 23:12:17 +0200 |
commit | 1dcbc161c403f62eed87603ce79f8bf2f266b778 (patch) | |
tree | ce8c33e0213293e3588ccd3b250a01b6becd081b /test/pretty/resource/after | |
parent | 05760d67ef4ccec8b702166371c7bdc9bdf77d95 (diff) | |
download | lombok-1dcbc161c403f62eed87603ce79f8bf2f266b778.tar.gz lombok-1dcbc161c403f62eed87603ce79f8bf2f266b778.tar.bz2 lombok-1dcbc161c403f62eed87603ce79f8bf2f266b778.zip |
[Closes #855] [jdk8] annotations are now legit on types and type parameters in JDK8, but we’d print errors in delombok when encountering these.
Diffstat (limited to 'test/pretty/resource/after')
-rw-r--r-- | test/pretty/resource/after/TypeAnnotations.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/pretty/resource/after/TypeAnnotations.java b/test/pretty/resource/after/TypeAnnotations.java new file mode 100644 index 00000000..760b5ef8 --- /dev/null +++ b/test/pretty/resource/after/TypeAnnotations.java @@ -0,0 +1,22 @@ +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; +import java.util.List; +import java.util.Map; +public class TypeAnnotations { + @Target({ElementType.TYPE_USE, ElementType.LOCAL_VARIABLE}) + @interface Foo { + } + @Target(ElementType.TYPE_USE) + @interface Bar { + } + public List<@Foo String> test(@Foo String param) { + @Bar + String local = "bar"; + @Foo + java.io.@Foo File[] array = {}; + return new java.util.@Foo ArrayList<java.lang.@Foo String>(); + } + public <@Foo T extends java.lang.@Foo Number> T test2(@Bar String... varargs) { + return null; + } +} |