Unsigned arrays: expose storage field as internal PublishedApi
To be able to write basic extensions that access storage array.
This commit is contained in:
@@ -278,7 +278,7 @@ class UnsignedArrayGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIn
|
||||
out.println("public inline class $arrayType")
|
||||
out.println("@Suppress(\"NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS\")")
|
||||
out.println("@PublishedApi")
|
||||
out.println("internal constructor(private val storage: $storageArrayType) : Collection<$elementType> {")
|
||||
out.println("internal constructor(@PublishedApi internal val storage: $storageArrayType) : Collection<$elementType> {")
|
||||
out.println(
|
||||
"""
|
||||
/** Creates a new array of the specified [size], with all elements initialized to zero. */
|
||||
|
||||
@@ -12,7 +12,7 @@ package kotlin
|
||||
public inline class UByteArray
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
@PublishedApi
|
||||
internal constructor(private val storage: ByteArray) : Collection<UByte> {
|
||||
internal constructor(@PublishedApi internal val storage: ByteArray) : Collection<UByte> {
|
||||
|
||||
/** Creates a new array of the specified [size], with all elements initialized to zero. */
|
||||
public constructor(size: Int) : this(ByteArray(size))
|
||||
|
||||
@@ -12,7 +12,7 @@ package kotlin
|
||||
public inline class UIntArray
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
@PublishedApi
|
||||
internal constructor(private val storage: IntArray) : Collection<UInt> {
|
||||
internal constructor(@PublishedApi internal val storage: IntArray) : Collection<UInt> {
|
||||
|
||||
/** Creates a new array of the specified [size], with all elements initialized to zero. */
|
||||
public constructor(size: Int) : this(IntArray(size))
|
||||
|
||||
@@ -12,7 +12,7 @@ package kotlin
|
||||
public inline class ULongArray
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
@PublishedApi
|
||||
internal constructor(private val storage: LongArray) : Collection<ULong> {
|
||||
internal constructor(@PublishedApi internal val storage: LongArray) : Collection<ULong> {
|
||||
|
||||
/** Creates a new array of the specified [size], with all elements initialized to zero. */
|
||||
public constructor(size: Int) : this(LongArray(size))
|
||||
|
||||
@@ -12,7 +12,7 @@ package kotlin
|
||||
public inline class UShortArray
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
@PublishedApi
|
||||
internal constructor(private val storage: ShortArray) : Collection<UShort> {
|
||||
internal constructor(@PublishedApi internal val storage: ShortArray) : Collection<UShort> {
|
||||
|
||||
/** Creates a new array of the specified [size], with all elements initialized to zero. */
|
||||
public constructor(size: Int) : this(ShortArray(size))
|
||||
|
||||
Reference in New Issue
Block a user