new inference: processing of compound bounds

This commit is contained in:
Anna Kozlova
2014-03-27 20:54:27 +01:00
parent e55a20cc24
commit b55c83742b
4 changed files with 26 additions and 2 deletions
@@ -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>);
}
}
@@ -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>;
}
}