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/before | |
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/before')
-rw-r--r-- | test/pretty/resource/before/TypeAnnotations.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/pretty/resource/before/TypeAnnotations.java b/test/pretty/resource/before/TypeAnnotations.java new file mode 100644 index 00000000..a39337da --- /dev/null +++ b/test/pretty/resource/before/TypeAnnotations.java @@ -0,0 +1,23 @@ +// version 8: +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; + } +} |