From b7cede3c27e42351e72618c45fd5e960df0e0133 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 17 Feb 2017 00:27:43 +0100 Subject: Reproduced issue #1132 (javac only); self-ref generics doesn’t work in `@Builder` in javac. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../knownBroken/before/I1132RecursiveGenerics.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/transform/knownBroken/before/I1132RecursiveGenerics.java (limited to 'test/transform') diff --git a/test/transform/knownBroken/before/I1132RecursiveGenerics.java b/test/transform/knownBroken/before/I1132RecursiveGenerics.java new file mode 100644 index 00000000..781886a7 --- /dev/null +++ b/test/transform/knownBroken/before/I1132RecursiveGenerics.java @@ -0,0 +1,19 @@ +// Compile with javac, it'll think the T in the generated build() method isn't type compatible. +// Yet, when you take the delomboked output (which delombok will give, but with errors), THAT does compile. + +public class I1132RecursiveGenerics { + public static class Recursive> {} + public static final class Rec extends Recursive {} + + @lombok.Builder(builderClassName = "MethodBuilder") + public static > T create() { + return null; + } + + public static void main(String[] args) { + final MethodBuilder builder = I1132RecursiveGenerics.builder(); + final Rec rec = builder.build(); +// final Rec rec = I1132RecursiveGenerics.builder().build(); + } +} + -- cgit