From 6c747dcdb204bf4c02258509c24580634a0b5eec Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Fri, 31 Aug 2018 17:41:38 +0300 Subject: [PATCH] Don't use constant conversion from signed to unsigned in stdlib After daadba09274994f92e438c6d859c68b2241245a4 --- libraries/stdlib/common/src/generated/_URanges.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/stdlib/common/src/generated/_URanges.kt b/libraries/stdlib/common/src/generated/_URanges.kt index 123d1e947fc..f507ff246b8 100644 --- a/libraries/stdlib/common/src/generated/_URanges.kt +++ b/libraries/stdlib/common/src/generated/_URanges.kt @@ -166,7 +166,7 @@ public infix fun ULongProgression.step(step: Long): ULongProgression { @SinceKotlin("1.3") @ExperimentalUnsignedTypes public infix fun UByte.until(to: UByte): UIntRange { - return this.toUInt() .. (to.toUInt() - 1).toUInt() + return this.toUInt() .. (to.toUInt() - 1u).toUInt() } /** @@ -180,7 +180,7 @@ public infix fun UByte.until(to: UByte): UIntRange { @ExperimentalUnsignedTypes public infix fun UInt.until(to: UInt): UIntRange { if (to <= UInt.MIN_VALUE) return UIntRange.EMPTY - return this .. (to - 1).toUInt() + return this .. (to - 1u).toUInt() } /** @@ -194,7 +194,7 @@ public infix fun UInt.until(to: UInt): UIntRange { @ExperimentalUnsignedTypes public infix fun ULong.until(to: ULong): ULongRange { if (to <= ULong.MIN_VALUE) return ULongRange.EMPTY - return this .. (to - 1).toULong() + return this .. (to - 1u).toULong() } /** @@ -205,6 +205,6 @@ public infix fun ULong.until(to: ULong): ULongRange { @SinceKotlin("1.3") @ExperimentalUnsignedTypes public infix fun UShort.until(to: UShort): UIntRange { - return this.toUInt() .. (to.toUInt() - 1).toUInt() + return this.toUInt() .. (to.toUInt() - 1u).toUInt() }