mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
type compatibility constrain: unchecked conversion: return type is inference variable case
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
public class Sample {
|
||||
interface G<A> {}
|
||||
interface G1 extends G {}
|
||||
|
||||
<B> B bar(B b) {return null;}
|
||||
|
||||
void f(G1 g1) {
|
||||
G<String> l11 = bar(g1);
|
||||
}
|
||||
}
|
||||
+4
@@ -38,6 +38,10 @@ public class ConstraintsInferenceMiscTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
public void testTypeCompatibilityUncheckedConversionReturnConstraints() throws Exception {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
private void doTest(final boolean checkWarnings) {
|
||||
doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user