diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2021-10-21 10:38:37 +0200 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2021-10-22 09:24:17 +0200 |
commit | 553b25addde4fab136258f7718e274a98bfbe34a (patch) | |
tree | f65f76f8c838a73f5f91f8efe0811c6b019857bb /test/transform/resource/before/ValInvalidParameter.java | |
parent | 13d84b129e562fdc71b049778c3b3bd2376e29a4 (diff) | |
download | lombok-553b25addde4fab136258f7718e274a98bfbe34a.tar.gz lombok-553b25addde4fab136258f7718e274a98bfbe34a.tar.bz2 lombok-553b25addde4fab136258f7718e274a98bfbe34a.zip |
[fixes #2985] Resolve var/val only once in eclipse
Diffstat (limited to 'test/transform/resource/before/ValInvalidParameter.java')
-rw-r--r-- | test/transform/resource/before/ValInvalidParameter.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/transform/resource/before/ValInvalidParameter.java b/test/transform/resource/before/ValInvalidParameter.java new file mode 100644 index 00000000..f4961c4e --- /dev/null +++ b/test/transform/resource/before/ValInvalidParameter.java @@ -0,0 +1,32 @@ +//version :9 +import lombok.val; + +public class ValInvalidParameter { + public void val() { + val a = a(new NonExistingClass()); + val b = a(a(new NonExistingClass())); + val c = nonExisitingMethod(b(1)); + val d = nonExistingObject.nonExistingMethod(); + val e = b(1).nonExistingMethod(); + val f = 1 > 2 ? a(new NonExistingClass()) : a(new NonExistingClass()); + val g = b2(1); + val h = b2(a("a"), a(null)); + val i = a(a(null)); + } + + public int a(String param) { + return 0; + } + + public int a(Integer param) { + return 0; + } + + public Integer b(int i) { + return i; + } + + public Integer b2(int i, int j) { + return i; + } +}
\ No newline at end of file |