Drop Cloneable in JS, synthesize it at compile-time on JVM

Use the same approach that is used for creating function type classes
(Function{0,1,...}) + add Cloneable to supertypes of Array and primitive arrays

 #KT-5537 Fixed
This commit is contained in:
Alexander Udalov
2016-10-13 11:53:18 +03:00
parent 0f4b10d37d
commit 035d6156a7
24 changed files with 376 additions and 173 deletions
@@ -298,6 +298,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("arraysAreCloneable.kt")
public void testArraysAreCloneable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt");
doTest(fileName);
}
@TestMetadata("cloneArray.kt")
public void testCloneArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt");