diff options
Diffstat (limited to 'test/transform/resource')
6 files changed, 51 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValWeirdTypes.java b/test/transform/resource/after-delombok/ValWeirdTypes.java index 8b399fe8..bc18fdac 100644 --- a/test/transform/resource/after-delombok/ValWeirdTypes.java +++ b/test/transform/resource/after-delombok/ValWeirdTypes.java @@ -37,6 +37,7 @@ public class ValWeirdTypes<Z> { final java.util.List<? super java.lang.Number> d = upper; List<?> unbound = lower; final java.util.List<?> e = unbound; + final java.lang.Object f = unbound.get(0); } public void testCompound() { final java.util.ArrayList<java.lang.String> a = new ArrayList<String>(); diff --git a/test/transform/resource/after-delombok/ValWithSelfRefGenerics.java b/test/transform/resource/after-delombok/ValWithSelfRefGenerics.java new file mode 100644 index 00000000..11cbf43f --- /dev/null +++ b/test/transform/resource/after-delombok/ValWithSelfRefGenerics.java @@ -0,0 +1,14 @@ +public class ValWithSelfRefGenerics { + public void run(Thing<? extends Comparable<?>> thing, Thing<?> thing2, java.util.List<? extends Number> z) { + final java.util.List<? extends java.lang.Number> y = z; + final Thing<? extends java.lang.Comparable<?>> x = thing; + final Thing<?> w = thing2; + final java.lang.Comparable<?> v = thing2.get(); + } +} + +class Thing<T extends Comparable<? super T>> { + public T get() { + return null; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/ValWeirdTypes.java b/test/transform/resource/after-ecj/ValWeirdTypes.java index e98b9753..401a8b7e 100644 --- a/test/transform/resource/after-ecj/ValWeirdTypes.java +++ b/test/transform/resource/after-ecj/ValWeirdTypes.java @@ -44,6 +44,7 @@ public class ValWeirdTypes<Z> { final @val java.util.List<? super java.lang.Number> d = upper; List<?> unbound = lower; final @val java.util.List<?> e = unbound; + final @val java.lang.Object f = unbound.get(0); } public void testCompound() { final @val java.util.ArrayList<java.lang.String> a = new ArrayList<String>(); diff --git a/test/transform/resource/after-ecj/ValWithSelfRefGenerics.java b/test/transform/resource/after-ecj/ValWithSelfRefGenerics.java new file mode 100644 index 00000000..3984e203 --- /dev/null +++ b/test/transform/resource/after-ecj/ValWithSelfRefGenerics.java @@ -0,0 +1,20 @@ +import lombok.val; +public class ValWithSelfRefGenerics { + public ValWithSelfRefGenerics() { + super(); + } + public void run(Thing<? extends Comparable<?>> thing, Thing<?> thing2, java.util.List<? extends Number> z) { + final @val java.util.List<? extends java.lang.Number> y = z; + final @val Thing<? extends java.lang.Comparable<?>> x = thing; + final @val Thing<?> w = thing2; + final @val java.lang.Object v = thing2.get(); + } +} +class Thing<T extends Comparable<? super T>> { + Thing() { + super(); + } + public T get() { + return null; + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/ValWeirdTypes.java b/test/transform/resource/before/ValWeirdTypes.java index 157ffc76..8dd63e86 100644 --- a/test/transform/resource/before/ValWeirdTypes.java +++ b/test/transform/resource/before/ValWeirdTypes.java @@ -44,6 +44,7 @@ public class ValWeirdTypes<Z> { val d = upper; List<?> unbound = lower; val e = unbound; + val f = unbound.get(0); } public void testCompound() { diff --git a/test/transform/resource/before/ValWithSelfRefGenerics.java b/test/transform/resource/before/ValWithSelfRefGenerics.java new file mode 100644 index 00000000..d0532606 --- /dev/null +++ b/test/transform/resource/before/ValWithSelfRefGenerics.java @@ -0,0 +1,14 @@ +import lombok.val; +public class ValWithSelfRefGenerics { + public void run(Thing<? extends Comparable<?>> thing, Thing<?> thing2, java.util.List<? extends Number> z) { + val y = z; + val x = thing; + val w = thing2; + val v = thing2.get(); + } +} +class Thing<T extends Comparable<? super T>> { + public T get() { + return null; + } +} |