Expand KDoc of inc() and dec() operators #KT-43701

This commit is contained in:
Abduqodiri Qurbonzoda
2021-01-18 00:50:15 +03:00
parent b311820159
commit 98d31a1813
16 changed files with 418 additions and 75 deletions
+11 -2
View File
@@ -217,10 +217,19 @@ public value class UByte @PublishedApi internal constructor(@PublishedApi intern
@kotlin.internal.InlineOnly
public inline fun mod(other: ULong): ULong = this.toULong().mod(other)
/** Increments this value. */
/**
* Returns this value incremented by one.
*
* @sample samples.misc.Builtins.inc
*/
@kotlin.internal.InlineOnly
public inline operator fun inc(): UByte = UByte(data.inc())
/** Decrements this value. */
/**
* Returns this value decremented by one.
*
* @sample samples.misc.Builtins.dec
*/
@kotlin.internal.InlineOnly
public inline operator fun dec(): UByte = UByte(data.dec())
+11 -2
View File
@@ -217,10 +217,19 @@ public value class UInt @PublishedApi internal constructor(@PublishedApi interna
@kotlin.internal.InlineOnly
public inline fun mod(other: ULong): ULong = this.toULong().mod(other)
/** Increments this value. */
/**
* Returns this value incremented by one.
*
* @sample samples.misc.Builtins.inc
*/
@kotlin.internal.InlineOnly
public inline operator fun inc(): UInt = UInt(data.inc())
/** Decrements this value. */
/**
* Returns this value decremented by one.
*
* @sample samples.misc.Builtins.dec
*/
@kotlin.internal.InlineOnly
public inline operator fun dec(): UInt = UInt(data.dec())
+11 -2
View File
@@ -217,10 +217,19 @@ public value class ULong @PublishedApi internal constructor(@PublishedApi intern
@kotlin.internal.InlineOnly
public inline fun mod(other: ULong): ULong = rem(other)
/** Increments this value. */
/**
* Returns this value incremented by one.
*
* @sample samples.misc.Builtins.inc
*/
@kotlin.internal.InlineOnly
public inline operator fun inc(): ULong = ULong(data.inc())
/** Decrements this value. */
/**
* Returns this value decremented by one.
*
* @sample samples.misc.Builtins.dec
*/
@kotlin.internal.InlineOnly
public inline operator fun dec(): ULong = ULong(data.dec())
+11 -2
View File
@@ -217,10 +217,19 @@ public value class UShort @PublishedApi internal constructor(@PublishedApi inter
@kotlin.internal.InlineOnly
public inline fun mod(other: ULong): ULong = this.toULong().mod(other)
/** Increments this value. */
/**
* Returns this value incremented by one.
*
* @sample samples.misc.Builtins.inc
*/
@kotlin.internal.InlineOnly
public inline operator fun inc(): UShort = UShort(data.inc())
/** Decrements this value. */
/**
* Returns this value decremented by one.
*
* @sample samples.misc.Builtins.dec
*/
@kotlin.internal.InlineOnly
public inline operator fun dec(): UShort = UShort(data.dec())