diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-03-06 05:24:39 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-03-06 05:25:03 +0100 |
commit | 732c7257e1db44b83b4748c93969cd74195d416f (patch) | |
tree | e2997ce7fdc9bcfe0521703502eb9e0b6c4dad01 /test/transform/resource/after-delombok | |
parent | 5e1ee5cb0dc26dd9a2a064edd7700abec5aa98fa (diff) | |
download | lombok-732c7257e1db44b83b4748c93969cd74195d416f.tar.gz lombok-732c7257e1db44b83b4748c93969cd74195d416f.tar.bz2 lombok-732c7257e1db44b83b4748c93969cd74195d416f.zip |
[fixes #2358] self-referential generics could cause endless loops in javac.
... unfortunately eclipse's val resolver is now very slightly worse in very exotic circumstances - spent about 4 hours trying to fix it, can't figure it out, let's move on.
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r-- | test/transform/resource/after-delombok/ValWeirdTypes.java | 1 | ||||
-rw-r--r-- | test/transform/resource/after-delombok/ValWithSelfRefGenerics.java | 14 |
2 files changed, 15 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 |