[fixes #2657] Use the correct field to query parent type parameters

This commit is contained in:
Rawi01 authored and Roel Spilker committed 2020-12-03 23:40:44 +01:00
1 parent e1f82ac4d1
commit 965f2367e0
4 files changed
+94 -1

No files matched your search

@@ -18,3 +18,16 @@ class ConstructorWithToBuilder<T> {
public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList<T> bars) {
}
}
class StaticMethodWithToBuilder<T> {
private T foo;
public StaticMethodWithToBuilder(T foo) {
this.foo = foo;
}
@Builder(toBuilder = true)
public static <T> StaticMethodWithToBuilder<T> of(T foo) {
return new StaticMethodWithToBuilder<T>(foo);
}
}