Use Intrinsics.checkNotNullParameter to throw NPE in parameter null checks

Similarly to previous commits, this method was unused, so we're changing
its semantics in API version >= 1.4.

 #KT-22275 In Progress
This commit is contained in:
Alexander Udalov
2019-08-06 10:56:44 +02:00
parent 480313210a
commit 2baddb029c
23 changed files with 173 additions and 16 deletions
@@ -2473,6 +2473,24 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
}
}
@TestMetadata("compiler/testData/codegen/boxInline/nullChecks")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NullChecks extends AbstractBlackBoxInlineCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInNullChecks() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nullChecks"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("parameterNullCheck_1_4.kt")
public void testParameterNullCheck_1_4() throws Exception {
runTest("compiler/testData/codegen/boxInline/nullChecks/parameterNullCheck_1_4.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxInline/optimizations")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)