type compatibility constrain: unchecked conversion step

This commit is contained in:
Anna Kozlova
2014-01-31 16:43:11 +04:00
parent af8095f8b0
commit 5a9c00a259
5 changed files with 45 additions and 10 deletions

View File

@@ -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) {}
}