Compile unsigned types sourceset with 1.3 and annotate them with SinceKotlin("1.3")

This commit is contained in:
Ilya Gorbunov
2018-06-29 16:08:50 +03:00
parent a72ad8b267
commit 615f57f2fc
15 changed files with 59 additions and 2 deletions
@@ -10,6 +10,7 @@ package kotlin
import kotlin.experimental.*
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
@SinceKotlin("1.3")
public inline class UInt internal constructor(private val data: Int) : Comparable<UInt> {
companion object {
@@ -132,7 +133,11 @@ public inline class UInt internal constructor(private val data: Int) : Comparabl
}
@SinceKotlin("1.3")
public fun Byte.toUInt(): UInt = UInt(this.toInt() and 0xFF)
@SinceKotlin("1.3")
public fun Short.toUInt(): UInt = UInt(this.toInt() and 0xFFFF)
@SinceKotlin("1.3")
public fun Int.toUInt(): UInt = UInt(this)
@SinceKotlin("1.3")
public fun Long.toUInt(): UInt = UInt(this.toInt())