unchecked warnings: check poly conditional branches in context of target type (IDEA-199615)

This commit is contained in:
Anna Kozlova
2018-09-28 19:59:32 +02:00
parent 6e4b897232
commit fe9799965c
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1,11 @@
class MyTest {
interface I<T> {
void m();
}
private final I<String> i;
public MyTest(I i) {
this.i = i == null ? () -> {} : <warning descr="Unchecked assignment: 'MyTest.I' to 'MyTest.I<java.lang.String>'">i</warning>;
}
}