Remove redundant JvmName annotations for Array.copyOf, copyOfRange

This commit is contained in:
Ilya Gorbunov
2016-01-12 22:57:16 +03:00
parent b99e1111f6
commit 68971e2162
2 changed files with 1 additions and 8 deletions
@@ -60,7 +60,6 @@ fun specialJVM(): List<GenericFunction> {
only(InvariantArraysOfObjects, ArraysOfPrimitives)
doc { "Returns new array which is a copy of range of original array." }
returns("SELF")
annotations(InvariantArraysOfObjects) { """@JvmName("mutableCopyOfRange")"""}
body {
"return Arrays.copyOfRange(this, fromIndex, toIndex)"
}
@@ -70,7 +69,6 @@ fun specialJVM(): List<GenericFunction> {
only(InvariantArraysOfObjects, ArraysOfPrimitives)
doc { "Returns new array which is a copy of the original array." }
returns("SELF")
annotations(InvariantArraysOfObjects) { """@JvmName("mutableCopyOf")"""}
body {
"return Arrays.copyOf(this, size)"
}
@@ -81,12 +79,10 @@ fun specialJVM(): List<GenericFunction> {
only(InvariantArraysOfObjects, ArraysOfPrimitives)
doc { "Returns new array which is a copy of the original array." }
returns("SELF")
returns(InvariantArraysOfObjects) { "Array<T?>" }
body {
"return Arrays.copyOf(this, newSize)"
}
returns(ArraysOfObjects) { "Array<out T?>" }
returns(InvariantArraysOfObjects) { "Array<T?>" }
annotations(InvariantArraysOfObjects) { """@JvmName("mutableCopyOf")"""}
}
templates add f("fill(element: T, fromIndex: Int = 0, toIndex: Int = size)") {