aboutsummaryrefslogtreecommitdiff
path: root/test/transform
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform')
-rw-r--r--test/transform/resource/after-delombok/ValAnonymousSubclassSelfReference.java10
-rw-r--r--test/transform/resource/after-ecj/ValAnonymousSubclassSelfReference.java9
-rw-r--r--test/transform/resource/before/ValAnonymousSubclassSelfReference.java13
3 files changed, 28 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/ValAnonymousSubclassSelfReference.java b/test/transform/resource/after-delombok/ValAnonymousSubclassSelfReference.java
index 4532ec28..a1176a3c 100644
--- a/test/transform/resource/after-delombok/ValAnonymousSubclassSelfReference.java
+++ b/test/transform/resource/after-delombok/ValAnonymousSubclassSelfReference.java
@@ -1,5 +1,13 @@
+import java.util.Map;
+import java.util.HashMap;
+
public class ValAnonymousSubclassSelfReference {
- public void test() {
+ 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;
final int j = 1;
final int k = 2;
diff --git a/test/transform/resource/after-ecj/ValAnonymousSubclassSelfReference.java b/test/transform/resource/after-ecj/ValAnonymousSubclassSelfReference.java
index 8a3c7fa8..12b0f640 100644
--- a/test/transform/resource/after-ecj/ValAnonymousSubclassSelfReference.java
+++ b/test/transform/resource/after-ecj/ValAnonymousSubclassSelfReference.java
@@ -1,9 +1,16 @@
+import java.util.Map;
+import java.util.HashMap;
import lombok.val;
public class ValAnonymousSubclassSelfReference {
public ValAnonymousSubclassSelfReference() {
super();
}
- public void test() {
+ 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;
final @val int j = 1;
final @val int k = 2;
diff --git a/test/transform/resource/before/ValAnonymousSubclassSelfReference.java b/test/transform/resource/before/ValAnonymousSubclassSelfReference.java
index 6ca05b3c..e7c30c84 100644
--- a/test/transform/resource/before/ValAnonymousSubclassSelfReference.java
+++ b/test/transform/resource/before/ValAnonymousSubclassSelfReference.java
@@ -1,9 +1,18 @@
-// issue 2420: to trigger the problem 2 var/val, one normal variable and a anonymous self reference is required
+// 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 void test() {
+ 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;