Suppress errors about non-public primary constructor and forbidden varargs

This commit is contained in:
Ilya Gorbunov
2018-05-09 04:45:13 +03:00
parent 0eee258fce
commit 793d34b913
9 changed files with 15 additions and 0 deletions
@@ -9,6 +9,7 @@ package kotlin
import kotlin.experimental.*
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class UByte internal constructor(private val data: Byte) : Comparable<UByte> {
companion object {
@@ -7,6 +7,7 @@
package kotlin
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class UByteArray internal constructor(private val storage: ByteArray) : Collection<UByte> {
/** Returns the array element at the given [index]. This method can be called using the index operator. */
@@ -40,6 +41,7 @@ public /*inline*/ fun UByteArray(size: Int, init: (Int) -> UByte): UByteArray {
return UByteArray(ByteArray(size) { index -> init(index).toByte() })
}
@Suppress("FORBIDDEN_VARARG_PARAMETER_TYPE")
public fun ubyteArrayOf(vararg elements: UByte): UByteArray {
return UByteArray(elements.size) { index -> elements[index] }
}
@@ -9,6 +9,7 @@ package kotlin
import kotlin.experimental.*
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class UInt internal constructor(private val data: Int) : Comparable<UInt> {
companion object {
@@ -7,6 +7,7 @@
package kotlin
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class UIntArray internal constructor(private val storage: IntArray) : Collection<UInt> {
/** Returns the array element at the given [index]. This method can be called using the index operator. */
@@ -40,6 +41,7 @@ public /*inline*/ fun UIntArray(size: Int, init: (Int) -> UInt): UIntArray {
return UIntArray(IntArray(size) { index -> init(index).toInt() })
}
@Suppress("FORBIDDEN_VARARG_PARAMETER_TYPE")
public fun uintArrayOf(vararg elements: UInt): UIntArray {
return UIntArray(elements.size) { index -> elements[index] }
}
@@ -9,6 +9,7 @@ package kotlin
import kotlin.experimental.*
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class ULong internal constructor(private val data: Long) : Comparable<ULong> {
companion object {
@@ -7,6 +7,7 @@
package kotlin
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class ULongArray internal constructor(private val storage: LongArray) : Collection<ULong> {
/** Returns the array element at the given [index]. This method can be called using the index operator. */
@@ -40,6 +41,7 @@ public /*inline*/ fun ULongArray(size: Int, init: (Int) -> ULong): ULongArray {
return ULongArray(LongArray(size) { index -> init(index).toLong() })
}
@Suppress("FORBIDDEN_VARARG_PARAMETER_TYPE")
public fun ulongArrayOf(vararg elements: ULong): ULongArray {
return ULongArray(elements.size) { index -> elements[index] }
}
@@ -9,6 +9,7 @@ package kotlin
import kotlin.experimental.*
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class UShort internal constructor(private val data: Short) : Comparable<UShort> {
companion object {
@@ -7,6 +7,7 @@
package kotlin
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class UShortArray internal constructor(private val storage: ShortArray) : Collection<UShort> {
/** Returns the array element at the given [index]. This method can be called using the index operator. */
@@ -40,6 +41,7 @@ public /*inline*/ fun UShortArray(size: Int, init: (Int) -> UShort): UShortArray
return UShortArray(ShortArray(size) { index -> init(index).toShort() })
}
@Suppress("FORBIDDEN_VARARG_PARAMETER_TYPE")
public fun ushortArrayOf(vararg elements: UShort): UShortArray {
return UShortArray(elements.size) { index -> elements[index] }
}