mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
new inference: reject to infer variables if it's upper bound doesn't agree with lower/equal bound (when present)
This commit is contained in:
+1
-1
@@ -3,6 +3,6 @@ abstract class A<S> {
|
||||
|
||||
{
|
||||
A<?> a = null;
|
||||
<error descr="Inferred type 'A<capture<?>>' for type parameter 'T' is not within its bound; should extend 'A<? extends java.lang.Throwable>'">foo(a)</error>;
|
||||
foo<error descr="'foo(T)' in 'A' cannot be applied to '(A<capture<?>>)'">(a)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ class CLS {
|
||||
static <V extends String> void bar (V v) {}
|
||||
|
||||
static void foo () {
|
||||
<error descr="Inferred type 'java.lang.Object' for type parameter 'V' is not within its bound; should extend 'java.lang.String'">bar(new Object())</error>;
|
||||
bar<error descr="'bar(V)' in 'CLS' cannot be applied to '(java.lang.Object)'">(new Object())</error>;
|
||||
}
|
||||
}
|
||||
//////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user