Make unsigned types experimental (with warning if not opted-in)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
package kotlin
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
public inline class UShortArray
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
@PublishedApi
|
||||
@@ -41,10 +42,12 @@ internal constructor(private val storage: ShortArray) : Collection<UShort> {
|
||||
}
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
public inline fun UShortArray(size: Int, init: (Int) -> UShort): UShortArray {
|
||||
return UShortArray(ShortArray(size) { index -> init(index).toShort() })
|
||||
}
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
// TODO: @kotlin.internal.InlineOnly
|
||||
public inline fun ushortArrayOf(vararg elements: UShort): UShortArray = elements
|
||||
|
||||
Reference in New Issue
Block a user