Prohibit using null as a value of generic type

#KT-7350 Fixed
 #KT-7736 Fixed
 #KT-7485 Fixed
This commit is contained in:
Denis Zharkov
2015-08-05 18:31:28 +03:00
parent dfac2205fd
commit a906be6dd7
5 changed files with 87 additions and 1 deletions
@@ -6129,6 +6129,21 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("compiler/testData/diagnostics/tests/generics/nullability")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Nullability extends AbstractJetDiagnosticsTest {
public void testAllFilesPresentInNullability() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/nullability"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("nullToGeneric.kt")
public void testNullToGeneric() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/generics/starProjections")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)