mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +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>;
|
||||
}
|
||||
}
|
||||
@@ -205,6 +205,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testInstanceClassInStaticContextAccess() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testFlattenIntersectionType() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testIDEA97276() throws Exception { doTest17Incompatibility(false); }
|
||||
public void testWildcardsBoundsIntersection() throws Exception { doTest17Incompatibility(false); }
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user