aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/BuilderWithToBuilder.java
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2020-11-25 09:25:57 +0100
committerRoel Spilker <r.spilker@gmail.com>2020-12-03 23:40:44 +0100
commit965f2367e0e57744c51b10ac341400b8ec57287a (patch)
tree576aefcf9b19488d9499c785e056a72907471221 /test/transform/resource/before/BuilderWithToBuilder.java
parente1f82ac4d132769cfc272dccfc916aeba7181718 (diff)
downloadlombok-965f2367e0e57744c51b10ac341400b8ec57287a.tar.gz
lombok-965f2367e0e57744c51b10ac341400b8ec57287a.tar.bz2
lombok-965f2367e0e57744c51b10ac341400b8ec57287a.zip
[fixes #2657] Use the correct field to query parent type parameters
Diffstat (limited to 'test/transform/resource/before/BuilderWithToBuilder.java')
-rw-r--r--test/transform/resource/before/BuilderWithToBuilder.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/transform/resource/before/BuilderWithToBuilder.java b/test/transform/resource/before/BuilderWithToBuilder.java
index 50938ab2..5b87a18f 100644
--- a/test/transform/resource/before/BuilderWithToBuilder.java
+++ b/test/transform/resource/before/BuilderWithToBuilder.java
@@ -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);
+ }
+} \ No newline at end of file