From a6fb86359a53742a549235e73f633f1b85c33bb5 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 14 Feb 2020 14:50:38 +0100 Subject: [issue #2369] [reproduction-test] inner types not detected as static if in interface/enum. --- test/transform/resource/after-delombok/WithNested.java | 13 +++++++++++++ test/transform/resource/after-ecj/WithNested.java | 12 ++++++++++++ test/transform/resource/before/WithNested.java | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 test/transform/resource/after-delombok/WithNested.java create mode 100644 test/transform/resource/after-ecj/WithNested.java create mode 100644 test/transform/resource/before/WithNested.java (limited to 'test') diff --git a/test/transform/resource/after-delombok/WithNested.java b/test/transform/resource/after-delombok/WithNested.java new file mode 100644 index 00000000..27b65577 --- /dev/null +++ b/test/transform/resource/after-delombok/WithNested.java @@ -0,0 +1,13 @@ +public interface WithNested { + class IAmStaticReally { + final String x; + @java.lang.SuppressWarnings("all") + public IAmStaticReally(final String x) { + this.x = x; + } + @java.lang.SuppressWarnings("all") + public WithNested.IAmStaticReally withX(final String x) { + return this.x == x ? this : new WithNested.IAmStaticReally(x); + } + } +} diff --git a/test/transform/resource/after-ecj/WithNested.java b/test/transform/resource/after-ecj/WithNested.java new file mode 100644 index 00000000..55f6edb2 --- /dev/null +++ b/test/transform/resource/after-ecj/WithNested.java @@ -0,0 +1,12 @@ +public interface WithNested { + @lombok.RequiredArgsConstructor class IAmStaticReally { + final @lombok.With String x; + public @java.lang.SuppressWarnings("all") WithNested.IAmStaticReally withX(final String x) { + return ((this.x == x) ? this : new WithNested.IAmStaticReally(x)); + } + public @java.lang.SuppressWarnings("all") IAmStaticReally(final String x) { + super(); + this.x = x; + } + } +} diff --git a/test/transform/resource/before/WithNested.java b/test/transform/resource/before/WithNested.java new file mode 100644 index 00000000..782821fc --- /dev/null +++ b/test/transform/resource/before/WithNested.java @@ -0,0 +1,7 @@ +public interface WithNested { + @lombok.RequiredArgsConstructor + class IAmStaticReally { + @lombok.With final String x; + } +} + -- cgit