mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
fix code to compile under java 11 as well
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import java.util.function.Predicate;
|
||||
|
||||
class B<T> {
|
||||
public static <E> B<E> from( Iterable<? extends E> iterable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void m(Iterable<? extends T> it, Predicate<? super T> p) {
|
||||
<error descr="Incompatible types. Found: 'B<capture<? extends T>>', required: 'B<T>'">B<T> B = from(it).bar(not(p));</error>
|
||||
}
|
||||
|
||||
B<T> bar(Predicate<? super T> p) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public static <N> Predicate<N> not(Predicate<? super N> c) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -201,6 +201,7 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
|
||||
doTest();
|
||||
}
|
||||
public void testNotInferredVarShouldNotBeUsedForInferenceJava10() { doTest(); }
|
||||
public void testJavac8UnCaptureBug() { doTest(); }
|
||||
public void testTopLevelParentNoParameters() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -241,7 +241,8 @@ public abstract class FilteredTraverserBase<T, Self extends FilteredTraverserBas
|
||||
return JBIterable.empty();
|
||||
}
|
||||
else if (myMeta.regard.next == null && myMeta.forceDisregard.next == null) {
|
||||
return JBIterable.from(myTree.fun(node)).filter(not(myMeta.forceIgnore.OR));
|
||||
JBIterable<T> from = JBIterable.from(myTree.fun(node));
|
||||
return from.filter(not(myMeta.forceIgnore.OR));
|
||||
}
|
||||
else {
|
||||
// traverse subtree to select accepted children
|
||||
|
||||
Reference in New Issue
Block a user