JVM, JVM IR: Don't optimize null-checks based on nullability information

Since Java interop allows us to circumvent the Kotlin type system we
cannot rely on nullability information.
This commit is contained in:
Steven Schäfer
2019-11-06 16:16:29 +01:00
committed by Alexander Udalov
parent de082543f1
commit b80e157381
6 changed files with 42 additions and 7 deletions
@@ -17920,6 +17920,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("unsafeNullCheck.kt")
public void testUnsafeNullCheck() throws Exception {
runTest("compiler/testData/codegen/box/platformTypes/unsafeNullCheck.kt");
}
@TestMetadata("compiler/testData/codegen/box/platformTypes/primitives")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)