mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 04:16:19 +00:00
SuperBuilder toBuilder: test with generics
This commit is contained in:
1 parent
790e060380
commit
63343fced5
3 files changed
+320
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import java.util.List;
|
||||
|
||||
public class SuperBuilderWithGenericsAndToBuilder {
|
||||
@lombok.experimental.SuperBuilder(toBuilder = true)
|
||||
public static class Parent<A> {
|
||||
A field1;
|
||||
@lombok.Singular List<String> items;
|
||||
}
|
||||
|
||||
@lombok.experimental.SuperBuilder(toBuilder = true)
|
||||
public static class Child<A> extends Parent<A> {
|
||||
double field3;
|
||||
}
|
||||
|
||||
public static void test() {
|
||||
Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item("").build().toBuilder().build();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user