aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2021-09-16 02:03:29 +0200
committerGitHub <noreply@github.com>2021-09-16 02:03:29 +0200
commit602a68b8f8ad0504b2aaf7c939328617dc2f2326 (patch)
treea71716d6a1cb520884b5ba98d25a3adb9e3a6d68 /test/transform/resource/before
parent8ed91a03622a083bd0062d8a236527d25f3ac178 (diff)
parentbd00fc4b83dd758c4369c8da97243691c04ac3fa (diff)
downloadlombok-602a68b8f8ad0504b2aaf7c939328617dc2f2326.tar.gz
lombok-602a68b8f8ad0504b2aaf7c939328617dc2f2326.tar.bz2
lombok-602a68b8f8ad0504b2aaf7c939328617dc2f2326.zip
Merge pull request #2840 from Rawi01/copy-vartype
Also copy vartype.type in TreeMirrorMaker
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/ValAnonymousSubclassSelfReference.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/transform/resource/before/ValAnonymousSubclassSelfReference.java b/test/transform/resource/before/ValAnonymousSubclassSelfReference.java
new file mode 100644
index 00000000..e7c30c84
--- /dev/null
+++ b/test/transform/resource/before/ValAnonymousSubclassSelfReference.java
@@ -0,0 +1,21 @@
+// issue 2420: to trigger the problem 2 var/val, at least one normal variable and a anonymous self reference is required
+import java.util.Map;
+import java.util.HashMap;
+
+import lombok.val;
+
+public class ValAnonymousSubclassSelfReference {
+ public <T> void test(T arg) {
+ T d = arg;
+ Integer[] e = new Integer[1];
+ int[] f = new int[0];
+ java.util.Map<java.lang.String, Integer> g = new HashMap<String, Integer>();
+ Integer h = 0;
+ int i = 0;
+
+ val j = 1;
+ val k = 2;
+
+ new ValAnonymousSubclassSelfReference() { };
+ }
+} \ No newline at end of file