diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2020-11-25 09:25:57 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-12-03 23:40:44 +0100 |
commit | 965f2367e0e57744c51b10ac341400b8ec57287a (patch) | |
tree | 576aefcf9b19488d9499c785e056a72907471221 /test/transform/resource/after-delombok | |
parent | e1f82ac4d132769cfc272dccfc916aeba7181718 (diff) | |
download | lombok-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/after-delombok')
-rw-r--r-- | test/transform/resource/after-delombok/BuilderWithToBuilder.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilder.java b/test/transform/resource/after-delombok/BuilderWithToBuilder.java index d98d09f6..3eeadcc5 100644 --- a/test/transform/resource/after-delombok/BuilderWithToBuilder.java +++ b/test/transform/resource/after-delombok/BuilderWithToBuilder.java @@ -147,4 +147,52 @@ class ConstructorWithToBuilder<T> { public ConstructorWithToBuilder.ConstructorWithToBuilderBuilder<T> toBuilder() { return new ConstructorWithToBuilder.ConstructorWithToBuilderBuilder<T>().mOne(this.mOne).baz(this.foo).bars(this.bars); } +} +class StaticMethodWithToBuilder<T> { + private T foo; + + public StaticMethodWithToBuilder(T foo) { + this.foo = foo; + } + + public static <T> StaticMethodWithToBuilder<T> of(T foo) { + return new StaticMethodWithToBuilder<T>(foo); + } + + @java.lang.SuppressWarnings("all") + public static class StaticMethodWithToBuilderBuilder<T> { + @java.lang.SuppressWarnings("all") + private T foo; + + @java.lang.SuppressWarnings("all") + StaticMethodWithToBuilderBuilder() { + } + + @java.lang.SuppressWarnings("all") + public StaticMethodWithToBuilder.StaticMethodWithToBuilderBuilder<T> foo(final T foo) { + this.foo = foo; + return this; + } + + @java.lang.SuppressWarnings("all") + public StaticMethodWithToBuilder<T> build() { + return StaticMethodWithToBuilder.<T>of(this.foo); + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "StaticMethodWithToBuilder.StaticMethodWithToBuilderBuilder(foo=" + this.foo + ")"; + } + } + + @java.lang.SuppressWarnings("all") + public static <T> StaticMethodWithToBuilder.StaticMethodWithToBuilderBuilder<T> builder() { + return new StaticMethodWithToBuilder.StaticMethodWithToBuilderBuilder<T>(); + } + + @java.lang.SuppressWarnings("all") + public StaticMethodWithToBuilder.StaticMethodWithToBuilderBuilder<T> toBuilder() { + return new StaticMethodWithToBuilder.StaticMethodWithToBuilderBuilder<T>().foo(this.foo); + } }
\ No newline at end of file |