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
+1 -6
View File
@@ -23,7 +23,7 @@ package kotlin
* See [Kotlin language documentation](http://kotlinlang.org/docs/reference/basic-types.html#arrays)
* for more information on arrays.
*/
public class Array<T> : Cloneable {
public class Array<T> {
/**
* Creates a new array with the specified [size], where each element is calculated by calling the specified
* [init] function. The [init] function returns an array element given its index.
@@ -57,9 +57,4 @@ public class Array<T> : Cloneable {
* Creates an iterator for iterating over the elements of the array.
*/
public operator fun iterator(): Iterator<T>
/**
* Creates a shallow copy of the array.
*/
public override fun clone(): Array<T>
}