diff options
Diffstat (limited to 'test/transform')
5 files changed, 28 insertions, 8 deletions
diff --git a/test/transform/resource/after-delombok/ValLambda.java b/test/transform/resource/after-delombok/ValLambda.java index 9214b490..60aeaac9 100644 --- a/test/transform/resource/after-delombok/ValLambda.java +++ b/test/transform/resource/after-delombok/ValLambda.java @@ -5,9 +5,9 @@ class ValLambda { }; } public void easyIntersectionLambda() { - final java.lang.Object foo = (Runnable & java.io.Serializable) () -> { + final java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> { }; - final java.lang.Object bar = (java.io.Serializable & Runnable) () -> { + final java.io.Serializable bar = (java.io.Serializable & Runnable) () -> { }; } public void easyLubLambda() { diff --git a/test/transform/resource/after-delombok/ValWeirdTypes.java b/test/transform/resource/after-delombok/ValWeirdTypes.java index a6bc9bd4..8b399fe8 100644 --- a/test/transform/resource/after-delombok/ValWeirdTypes.java +++ b/test/transform/resource/after-delombok/ValWeirdTypes.java @@ -56,8 +56,14 @@ public class ValWeirdTypes<Z> { 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) { + final java.util.List<java.lang.Class<? extends java.io.Serializable>> x = Arrays.asList(String.class, BigDecimal.class); + for (final java.lang.Class<? extends java.io.Serializable> y : x) { + } + } + @SuppressWarnings("all") + public void arraysAsList2() { + final java.util.List<java.lang.Class<? extends java.lang.Comparable>> x = Arrays.asList(String.class, BigDecimal.class, Comparable.class); + for (final java.lang.Class<? extends java.lang.Comparable> y : x) { } } } diff --git a/test/transform/resource/after-ecj/ValLambda.java b/test/transform/resource/after-ecj/ValLambda.java index 4bf3265b..4e2b97a1 100644 --- a/test/transform/resource/after-ecj/ValLambda.java +++ b/test/transform/resource/after-ecj/ValLambda.java @@ -7,9 +7,9 @@ class ValLambda { }; } public void easyIntersectionLambda() { - final @lombok.val java.lang.Object foo = (Runnable & java.io.Serializable) () -> { + final @lombok.val java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> { }; - final @lombok.val java.lang.Object bar = (java.io.Serializable & Runnable) () -> { + final @lombok.val java.io.Serializable bar = (java.io.Serializable & Runnable) () -> { }; } public void easyLubLambda() { diff --git a/test/transform/resource/after-ecj/ValWeirdTypes.java b/test/transform/resource/after-ecj/ValWeirdTypes.java index 9f448db9..e98b9753 100644 --- a/test/transform/resource/after-ecj/ValWeirdTypes.java +++ b/test/transform/resource/after-ecj/ValWeirdTypes.java @@ -63,8 +63,14 @@ public class ValWeirdTypes<Z> { 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) + final @val java.util.List<java.lang.Class<? extends java.io.Serializable>> x = Arrays.asList(String.class, BigDecimal.class); + for (final @val java.lang.Class<? extends java.io.Serializable> y : x) + { + } + } + public @SuppressWarnings("all") void arraysAsList2() { + final @val java.util.List<java.lang.Class<? extends java.lang.Comparable>> x = Arrays.asList(String.class, BigDecimal.class, Comparable.class); + for (final @val java.lang.Class<? extends java.lang.Comparable> y : x) { } } diff --git a/test/transform/resource/before/ValWeirdTypes.java b/test/transform/resource/before/ValWeirdTypes.java index 4ea1b5d4..157ffc76 100644 --- a/test/transform/resource/before/ValWeirdTypes.java +++ b/test/transform/resource/before/ValWeirdTypes.java @@ -72,4 +72,12 @@ public class ValWeirdTypes<Z> { } } + + @SuppressWarnings("all") + public void arraysAsList2() { + val x = Arrays.asList(String.class, BigDecimal.class, Comparable.class); + for (val y : x) { + + } + } }
\ No newline at end of file |