From 965f2367e0e57744c51b10ac341400b8ec57287a Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Wed, 25 Nov 2020 09:25:57 +0100 Subject: [fixes #2657] Use the correct field to query parent type parameters --- test/transform/resource/before/BuilderWithToBuilder.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/transform/resource/before') 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 { public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList bars) { } } + +class StaticMethodWithToBuilder { + private T foo; + + public StaticMethodWithToBuilder(T foo) { + this.foo = foo; + } + + @Builder(toBuilder = true) + public static StaticMethodWithToBuilder of(T foo) { + return new StaticMethodWithToBuilder(foo); + } +} \ No newline at end of file -- cgit