mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
IDEA-84377: check for recursive bounds
This commit is contained in:
+20
@@ -1,4 +1,5 @@
|
||||
import java.util.*;
|
||||
import java.util.Comparator;
|
||||
|
||||
|
||||
/**
|
||||
@@ -247,3 +248,22 @@ class IDEA79360 {
|
||||
map = new HashMap<Object, Object>(test);
|
||||
}
|
||||
}
|
||||
|
||||
class GenericFailureExample {
|
||||
|
||||
interface Descriptor<T extends Comparable<T>> {
|
||||
Class<T> getType();
|
||||
}
|
||||
|
||||
void isMarkedFaultyButCompilesClean(Descriptor<?> n) {
|
||||
bar(n.getType());
|
||||
}
|
||||
|
||||
<T extends Comparable<T>> void butThisWorks(Descriptor<T> n) {
|
||||
bar(n.getType());
|
||||
}
|
||||
|
||||
<T extends Comparable<T>> Comparator<T> bar(Class<T> type) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user