mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-14 00:01:54 +07:00
type compatibility constrain: unchecked conversion step
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ class Test {
|
||||
|
||||
public void test(Set<MyConsumer> set) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Parent, MyConsumer<Parent>> map = <error descr="Inferred type 'T' for type parameter 'T' is not within its bound; should implement 'Test.Consumer<Test.Parent>'">create(set)</error>;
|
||||
Map<Parent, MyConsumer<Parent>> map = create<error descr="'create(java.util.Set<T>)' in 'Test' cannot be applied to '(java.util.Set<Test.MyConsumer>)'">(set)</error>;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
public class Sample {
|
||||
interface G<A> {}
|
||||
interface G1 extends G {}
|
||||
|
||||
void foo(G1 g1) {
|
||||
bar(g1);
|
||||
}
|
||||
<B>void bar(G<B> gb) {}
|
||||
|
||||
void foo(G1[] g1) {
|
||||
bar(g1);
|
||||
}
|
||||
<B>void bar(G<B>[] gb) {}
|
||||
}
|
||||
Reference in New Issue
Block a user