diff options
author | Roel Spilker <r.spilker@gmail.com> | 2019-02-19 01:47:49 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2019-02-19 01:47:49 +0100 |
commit | 8479edb4262a7eb8cb76baba138f0ea5aae841c5 (patch) | |
tree | 06be11d07b5b216f8a5d422b00a4f800391ceeb3 /test/transform | |
parent | fd9045dac2a3d9b26125b8ccc865b23d8f7cd8d4 (diff) | |
download | lombok-8479edb4262a7eb8cb76baba138f0ea5aae841c5.tar.gz lombok-8479edb4262a7eb8cb76baba138f0ea5aae841c5.tar.bz2 lombok-8479edb4262a7eb8cb76baba138f0ea5aae841c5.zip |
var/val in Eclipse can now handle intersection types, fixes #1986
Diffstat (limited to 'test/transform')
-rw-r--r-- | test/transform/resource/after-delombok/ValWeirdTypes.java | 6 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/ValWeirdTypes.java | 7 | ||||
-rw-r--r-- | test/transform/resource/before/ValWeirdTypes.java | 8 |
3 files changed, 21 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValWeirdTypes.java b/test/transform/resource/after-delombok/ValWeirdTypes.java index cd6ba538..a6bc9bd4 100644 --- a/test/transform/resource/after-delombok/ValWeirdTypes.java +++ b/test/transform/resource/after-delombok/ValWeirdTypes.java @@ -1,3 +1,4 @@ +import java.math.BigDecimal; import java.util.*; public class ValWeirdTypes<Z> { private List<Z> fieldList; @@ -54,4 +55,9 @@ public class ValWeirdTypes<Z> { final java.lang.Object[] single = multiDimArray[0]; final int singleInt = copy[0]; } + public void arraysAsList() { + final java.util.List<java.lang.Class<? extends java.lang.Object>> x = Arrays.asList(String.class, BigDecimal.class); + for (final java.lang.Class<?> y : x) { + } + } } diff --git a/test/transform/resource/after-ecj/ValWeirdTypes.java b/test/transform/resource/after-ecj/ValWeirdTypes.java index 516a3932..9f448db9 100644 --- a/test/transform/resource/after-ecj/ValWeirdTypes.java +++ b/test/transform/resource/after-ecj/ValWeirdTypes.java @@ -1,3 +1,4 @@ +import java.math.BigDecimal; import java.util.*; import lombok.val; public class ValWeirdTypes<Z> { @@ -61,4 +62,10 @@ public class ValWeirdTypes<Z> { final @val java.lang.Object[] single = multiDimArray[0]; final @val int singleInt = copy[0]; } + public void arraysAsList() { + final @val java.util.List<java.lang.Class<? extends java.lang.Object>> x = Arrays.asList(String.class, BigDecimal.class); + for (final @val java.lang.Class<? extends java.lang.Object> y : x) + { + } + } }
\ No newline at end of file diff --git a/test/transform/resource/before/ValWeirdTypes.java b/test/transform/resource/before/ValWeirdTypes.java index 8cba2de5..4ea1b5d4 100644 --- a/test/transform/resource/before/ValWeirdTypes.java +++ b/test/transform/resource/before/ValWeirdTypes.java @@ -1,3 +1,4 @@ +import java.math.BigDecimal; import java.util.*; import lombok.val; @@ -64,4 +65,11 @@ public class ValWeirdTypes<Z> { val single = multiDimArray[0]; val singleInt = copy[0]; } + + public void arraysAsList() { + val x = Arrays.asList(String.class, BigDecimal.class); + for (val y : x) { + + } + } }
\ No newline at end of file |