[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.
This commit is contained in:
Reinier Zwitserloot committed 2020-03-06 05:25:03 +01:00
1 parent 5e1ee5cb0d
commit 732c7257e1
8 files changed
+88 -19

No files matched your search

@@ -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;
}
}