type compatibility constrain: boxing is not completeness-preserving: move treatment to return constraint

This commit is contained in:
Anna Kozlova
2014-01-31 21:41:14 +04:00
parent 4444fc1126
commit af8095f8b0
4 changed files with 46 additions and 5 deletions
@@ -0,0 +1,7 @@
public class Sample {
static <T> T foo(T t) { return null; }
static {
long l11 = foo(1 );
}
}
@@ -30,6 +30,10 @@ public class ConstraintsInferenceMiscTest extends LightDaemonAnalyzerTestCase {
doTest(false);
}
public void testPrimitiveTypesCompatibility() throws Exception {
doTest(false);
}
private void doTest(final boolean checkWarnings) {
doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, false);
}