[NI] Consider CS as nullable if one of the types isn't subtype of Any

Note that this isn't fully correct, consider the following situation:

S : T, T : Any?
=> CS(S, T) = T, but for now it will be T?, which is reliable but not so specific as just T
This commit is contained in:
Mikhail Zarechenskiy
2017-07-03 13:44:01 +03:00
parent 39349abd39
commit 0d464f06d1
6 changed files with 42 additions and 7 deletions
@@ -16928,6 +16928,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("nullabilityForCommonCapturedSupertypes.kt")
public void testNullabilityForCommonCapturedSupertypes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt");
doTest(fileName);
}
@TestMetadata("objectCaptureOuterConstructorProperty.kt")
public void testObjectCaptureOuterConstructorProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt");