Add Map.getOrDefault method as PlatformDependent declaration with refined signature

- First parameter should have type of K instead of Any
- Special bridge should return second parameter if a key has wrong type
- Special bridge may throw an exception if defaultValue has wrong type

 #KT-13209 Fixed
This commit is contained in:
Denis Zharkov
2016-07-27 12:14:08 +03:00
parent 169acf2f31
commit 915e36cb02
15 changed files with 353 additions and 26 deletions
@@ -139,6 +139,12 @@ public class DiagnosticsWithJava8TestGenerated extends AbstractDiagnosticsWithFu
doTest(fileName);
}
@TestMetadata("getOrDefault.kt")
public void testGetOrDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/targetedBuiltIns/getOrDefault.kt");
doTest(fileName);
}
@TestMetadata("mutableMapRemove.kt")
public void testMutableMapRemove() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava8/targetedBuiltIns/mutableMapRemove.kt");