mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
new inference: processing of compound bounds
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
class NachCollections<K,V> {
|
||||
<K1, V1> Consumer<Map.Entry<K1, V1>> consumer(Consumer<Map.Entry<K1, V1>> c) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void forEach(Collection<? extends Map.Entry<K,V>> c1,
|
||||
Collection<? super Map.Entry<K,V>> c2,
|
||||
Consumer<Map.Entry<K, V>> a) {
|
||||
c1.forEach(consumer(a));
|
||||
c2.forEach(consumer<error descr="'consumer(java.util.function.Consumer<java.util.Map.Entry<K1,V1>>)' in 'NachCollections' cannot be applied to '(java.util.function.Consumer<java.util.Map.Entry<K,V>>)'">(a)</error>);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@ class Node<NodeTypeT extends NodeType> {
|
||||
|
||||
class Main {
|
||||
public static void main(NodeProperty<NumberExpression, Integer> nval, Node<? extends NodeType> expr) {
|
||||
int val = expr.get<error descr="'get(NodeProperty<? super capture<? extends NodeType>,java.lang.Object>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
|
||||
int val = expr.get<error descr="'get(NodeProperty<? super capture<? extends NodeType>,java.lang.Integer>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user