diff options
author | Roel Spilker <r.spilker@gmail.com> | 2017-02-10 00:10:07 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2017-02-10 00:10:17 +0100 |
commit | 2335512c8e134a1f6a7a567948543bf87613544b (patch) | |
tree | 49f5e76ea38b82cc7db9791f77c890c573f962f9 /test/transform/resource/after-ecj | |
parent | 4ea6857c7f14babe1c7130a7418f943186979885 (diff) | |
download | lombok-2335512c8e134a1f6a7a567948543bf87613544b.tar.gz lombok-2335512c8e134a1f6a7a567948543bf87613544b.tar.bz2 lombok-2335512c8e134a1f6a7a567948543bf87613544b.zip |
[i1274] Add outer name to type name for nested types in equals.
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r-- | test/transform/resource/after-ecj/DataOnLocalClass.java | 2 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java | 58 |
2 files changed, 59 insertions, 1 deletions
diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index 9d6bced1..a86837e3 100644 --- a/test/transform/resource/after-ecj/DataOnLocalClass.java +++ b/test/transform/resource/after-ecj/DataOnLocalClass.java @@ -73,7 +73,7 @@ class DataOnLocalClass2 { return true; if ((! (o instanceof Local.InnerLocal))) return false; - final InnerLocal other = (InnerLocal) o; + final Local.InnerLocal other = (Local.InnerLocal) o; if ((! other.canEqual((java.lang.Object) this))) return false; final java.lang.Object this$name = this.getName(); diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java b/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java new file mode 100644 index 00000000..5af6e9d8 --- /dev/null +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeNestedShadow.java @@ -0,0 +1,58 @@ +interface EqualsAndHashCodeNestedShadow { + interface Foo { + } + class Bar { + public static @lombok.EqualsAndHashCode(callSuper = false) class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + public Foo() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeNestedShadow.Bar.Foo))) + return false; + final EqualsAndHashCodeNestedShadow.Bar.Foo other = (EqualsAndHashCodeNestedShadow.Bar.Foo) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeNestedShadow.Bar.Foo); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { + int result = 1; + return result; + } + } + Bar() { + super(); + } + } + class Baz { + public static @lombok.EqualsAndHashCode(callSuper = false) class Foo<T> extends Bar implements EqualsAndHashCodeNestedShadow.Foo { + public Foo() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeNestedShadow.Baz.Foo))) + return false; + final EqualsAndHashCodeNestedShadow.Baz.Foo<?> other = (EqualsAndHashCodeNestedShadow.Baz.Foo<?>) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeNestedShadow.Baz.Foo); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() { + int result = 1; + return result; + } + } + Baz() { + super(); + } + } +}
\ No newline at end of file |