Separate additional built-in members from JDK into three groups

- White list: can be used as common built-in declaration
- Black list: can be used only for overrides and super-calls-
- Not considered members: ones that is not in black or white list.
Such members can be used in any context, but they usages marked as deprecated

Third kind is needed to make possible use declarations added in future JDK versions.
Deprecation is necessary because they may get into black list in next Kotlin compiler version
This commit is contained in:
Denis Zharkov
2016-04-28 19:06:12 +03:00
parent 308ee93392
commit e90c92f8d3
24 changed files with 1505 additions and 30 deletions
@@ -121,6 +121,12 @@ public class DiagnosticsWithJava8TestGenerated extends AbstractDiagnosticsWithFu
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava8/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("blackListed.kt")
public void testBlackListed() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/targetedBuiltIns/blackListed.kt");
doTest(fileName);
}
@TestMetadata("concurrentMapRemove.kt")
public void testConcurrentMapRemove() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/targetedBuiltIns/concurrentMapRemove.kt");
@@ -63,7 +63,9 @@ class AdditionalBuiltInsMembersSignatureListsTest : KotlinTestWithEnvironment()
val blackList =
JvmBuiltInsSettings.BLACK_LIST_METHOD_SIGNATURES +
JvmBuiltInsSettings.MUTABLE_METHOD_SIGNATURES +
JvmBuiltInsSettings.BLACK_LIST_CONSTRUCTOR_SIGNATURES
JvmBuiltInsSettings.BLACK_LIST_CONSTRUCTOR_SIGNATURES +
JvmBuiltInsSettings.WHITE_LIST_METHOD_SIGNATURES +
JvmBuiltInsSettings.WHITE_LIST_CONSTRUCTOR_SIGNATURES
val groupedByInternalName = blackList.groupBy({ it.split(".")[0] }) { it.split(".")[1] }