new inference: avoid inferring partly raw types (in case of unchecked conversion resolve to eq/low bound or null if only upper is present) as these types won't be treated as wildcard parameterized ever (IDEA-150167)

This commit is contained in:
Anna.Kozlova
2016-03-24 11:48:06 +01:00
parent 4232fad53c
commit bf5cd076c1
5 changed files with 34 additions and 4 deletions
@@ -7,8 +7,8 @@ public class Sample {
<B> B bar(G<B> gb) {return null;}
void f(G1 g1) {
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'Sample.G<java.lang.String>'">G<String> l11 = bar(g1);</error>
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.lang.String'">String l1 = bar(g1);</error>
G<String> l11 = bar<error descr="'bar(Sample.G<B>)' in 'Sample' cannot be applied to '(Sample.G1)'">(g1)</error>;
String l1 = bar<error descr="'bar(Sample.G<B>)' in 'Sample' cannot be applied to '(Sample.G1)'">(g1)</error>;
Object o = bar(g1);
}
}