Make overridden compareTo in unsigned types inline only

This commit is contained in:
Ilya Gorbunov
2018-09-18 17:43:10 +03:00
parent 9e0708e85a
commit af29dced98
7 changed files with 21 additions and 16 deletions
+3 -1
View File
@@ -57,7 +57,9 @@ public inline class UInt @PublishedApi internal constructor(@PublishedApi intern
* Returns zero if this value is equal to the specified other value, a negative number if it's less than other,
* or a positive number if it's greater than other.
*/
public override operator fun compareTo(other: UInt): Int = uintCompare(this.data, other.data)
@kotlin.internal.InlineOnly
@Suppress("OVERRIDE_BY_INLINE")
public override inline operator fun compareTo(other: UInt): Int = uintCompare(this.data, other.data)
/**
* Compares this value with the specified value for order.