inference: mark call unchecked required when proper types are compared (IDEA-164243)

This commit is contained in:
Anna.Kozlova
2016-11-21 19:33:20 +01:00
parent 7787b8f763
commit becb6c7387
3 changed files with 25 additions and 1 deletions
@@ -0,0 +1,17 @@
class Test {
private static AG<AE> foo(Class clz) {
return (AG<AE>) foo1(clz);
}
private static <T extends E> G<T> foo1(Class<? extends E> clz) {
return null;
}
interface E {}
interface AE extends E {}
interface G<T extends E> {}
interface AG<T extends AE> extends G<T> {}
}
@@ -491,6 +491,10 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
doTest();
}
public void testUncheckedConversionDuringProperTypeExpressionConstraintResolution() throws Exception {
doTest();
}
private void doTest() throws Exception {
doTest(false);
}