NI: propagate isNullabilityConstraint flag into constraint injector and inherit it

^KT-37510 Fixed
This commit is contained in:
Victor Petukhov
2020-04-07 13:50:50 +03:00
parent 19e352a1b5
commit 11d05c1abd
11 changed files with 142 additions and 26 deletions
@@ -2167,6 +2167,24 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/delegates/kt32249.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NothingType extends AbstractFirOldFrontendDiagnosticsTestWithStdlib {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInNothingType() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("dontInferToNullableNothingInDelegates.kt")
public void testDontInferToNullableNothingInDelegates() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/nothingType/dontInferToNullableNothingInDelegates.kt");
}
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inline")