mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
composition of extends/super wildcard should get just its bound (IDEA-96721)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
class NodeProperty<A, B> {}
|
||||
|
||||
class NodeType {}
|
||||
class NumberExpression extends NodeType {}
|
||||
class Node<NodeTypeT extends NodeType> {
|
||||
public <ValueT> ValueT get(NodeProperty<? super NodeTypeT, ValueT> prop) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Main {
|
||||
public static void main(NodeProperty<NumberExpression, Integer> nval, Node<? extends NodeType> expr) {
|
||||
int val = expr.get<error descr="'get(NodeProperty<NodeType,java.lang.Integer>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user