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
@@ -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] }
}