diff --git a/core/builtins/native/kotlin/Library.kt b/core/builtins/native/kotlin/Library.kt index a37edfd2c0b..cef523a7b19 100644 --- a/core/builtins/native/kotlin/Library.kt +++ b/core/builtins/native/kotlin/Library.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,3 +34,48 @@ public operator fun String?.plus(other: Any?): String * Returns an array of objects of the given type with the given [size], initialized with null values. */ public fun arrayOfNulls(size: Int): Array + +/** + * Returns an array containing the specified elements. + */ +public inline fun arrayOf(vararg elements: T): Array + +/** + * Returns an array containing the specified [Double] numbers. + */ +public fun doubleArrayOf(vararg elements: Double): DoubleArray + +/** + * Returns an array containing the specified [Float] numbers. + */ +public fun floatArrayOf(vararg elements: Float): FloatArray + +/** + * Returns an array containing the specified [Long] numbers. + */ +public fun longArrayOf(vararg elements: Long): LongArray + +/** + * Returns an array containing the specified [Int] numbers. + */ +public fun intArrayOf(vararg elements: Int): IntArray + +/** + * Returns an array containing the specified characters. + */ +public fun charArrayOf(vararg elements: Char): CharArray + +/** + * Returns an array containing the specified [Short] numbers. + */ +public fun shortArrayOf(vararg elements: Short): ShortArray + +/** + * Returns an array containing the specified [Byte] numbers. + */ +public fun byteArrayOf(vararg elements: Byte): ByteArray + +/** + * Returns an array containing the specified boolean values. + */ +public fun booleanArrayOf(vararg elements: Boolean): BooleanArray diff --git a/core/builtins/src/kotlin/ArrayIntrinsics.kt b/core/builtins/src/kotlin/ArrayIntrinsics.kt index ac09d8f7d4b..4da52a63162 100644 --- a/core/builtins/src/kotlin/ArrayIntrinsics.kt +++ b/core/builtins/src/kotlin/ArrayIntrinsics.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,47 +23,3 @@ import kotlin.internal.PureReifiable */ public inline fun emptyArray(): Array = arrayOfNulls(0) as Array -/** - * Returns an array containing the specified elements. - */ -public inline fun arrayOf(vararg elements: T): Array = elements as Array - -/** - * Returns an array containing the specified [Double] numbers. - */ -public fun doubleArrayOf(vararg elements: Double): DoubleArray = elements - -/** - * Returns an array containing the specified [Float] numbers. - */ -public fun floatArrayOf(vararg elements: Float): FloatArray = elements - -/** - * Returns an array containing the specified [Long] numbers. - */ -public fun longArrayOf(vararg elements: Long): LongArray = elements - -/** - * Returns an array containing the specified [Int] numbers. - */ -public fun intArrayOf(vararg elements: Int): IntArray = elements - -/** - * Returns an array containing the specified characters. - */ -public fun charArrayOf(vararg elements: Char): CharArray = elements - -/** - * Returns an array containing the specified [Short] numbers. - */ -public fun shortArrayOf(vararg elements: Short): ShortArray = elements - -/** - * Returns an array containing the specified [Byte] numbers. - */ -public fun byteArrayOf(vararg elements: Byte): ByteArray = elements - -/** - * Returns an array containing the specified boolean values. - */ -public fun booleanArrayOf(vararg elements: Boolean): BooleanArray = elements diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-runtime.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-runtime.txt index 0ded968397f..f9fd6c7a1d5 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-runtime.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-runtime.txt @@ -1,14 +1,3 @@ -public final class kotlin/ArrayIntrinsicsKt { - public static final fun booleanArrayOf ([Z)[Z - public static final fun byteArrayOf ([B)[B - public static final fun charArrayOf ([C)[C - public static final fun doubleArrayOf ([D)[D - public static final fun floatArrayOf ([F)[F - public static final fun intArrayOf ([I)[I - public static final fun longArrayOf ([J)[J - public static final fun shortArrayOf ([S)[S -} - public abstract interface annotation class kotlin/Deprecated : java/lang/annotation/Annotation { public abstract fun level ()Lkotlin/DeprecationLevel; public abstract fun message ()Ljava/lang/String;