diff --git a/core/builtins/native/kotlin/Primitives.kt b/core/builtins/native/kotlin/Primitives.kt index b8e2a29410d..02f31030faf 100644 --- a/core/builtins/native/kotlin/Primitives.kt +++ b/core/builtins/native/kotlin/Primitives.kt @@ -537,11 +537,11 @@ public class Int private constructor() : Number(), Comparable { /** Creates a range from this value to the specified [other] value. */ public operator fun rangeTo(other: Long): LongRange - /** Shifts this value left by [bits]. */ + /** Shifts this value left by the [bitCount] number of bits. */ public infix fun shl(bitCount: Int): Int - /** Shifts this value right by [bits], filling the leftmost bits with copies of the sign bit. */ + /** Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with copies of the sign bit. */ public infix fun shr(bitCount: Int): Int - /** Shifts this value right by [bits], filling the leftmost bits with zeros. */ + /** Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with zeros. */ public infix fun ushr(bitCount: Int): Int /** Performs a bitwise AND operation between the two values. */ public infix fun and(other: Int): Int @@ -728,11 +728,11 @@ public class Long private constructor() : Number(), Comparable { /** Creates a range from this value to the specified [other] value. */ public operator fun rangeTo(other: Long): LongRange - /** Shifts this value left by [bits]. */ + /** Shifts this value left by the [bitCount] number of bits. */ public infix fun shl(bitCount: Int): Long - /** Shifts this value right by [bits], filling the leftmost bits with copies of the sign bit. */ + /** Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with copies of the sign bit. */ public infix fun shr(bitCount: Int): Long - /** Shifts this value right by [bits], filling the leftmost bits with zeros. */ + /** Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with zeros. */ public infix fun ushr(bitCount: Int): Long /** Performs a bitwise AND operation between the two values. */ public infix fun and(other: Long): Long diff --git a/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt b/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt index 89c10791fc1..ae5346000e0 100644 --- a/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt +++ b/generators/src/org/jetbrains/kotlin/generators/builtins/primitives.kt @@ -36,9 +36,9 @@ class GeneratePrimitives(out: PrintWriter) : BuiltInsSourceGenerator(out) { "unaryPlus" to "Returns this value.", "unaryMinus" to "Returns the negative of this value.") private val shiftOperators: Map = mapOf( - "shl" to "Shifts this value left by [bits].", - "shr" to "Shifts this value right by [bits], filling the leftmost bits with copies of the sign bit.", - "ushr" to "Shifts this value right by [bits], filling the leftmost bits with zeros.") + "shl" to "Shifts this value left by the [bitCount] number of bits.", + "shr" to "Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with copies of the sign bit.", + "ushr" to "Shifts this value right by the [bitCount] number of bits, filling the leftmost bits with zeros.") private val bitwiseOperators: Map = mapOf( "and" to "Performs a bitwise AND operation between the two values.", "or" to "Performs a bitwise OR operation between the two values.", diff --git a/js/js.libraries/src/core/collections/HashMap.kt b/js/js.libraries/src/core/collections/HashMap.kt index 1c225c094c2..250959d8841 100644 --- a/js/js.libraries/src/core/collections/HashMap.kt +++ b/js/js.libraries/src/core/collections/HashMap.kt @@ -26,7 +26,7 @@ import kotlin.collections.MutableMap.MutableEntry /** * Hash table based implementation of the [MutableMap] interface. * - * This implementation makes no guarantees regarding the order of enumeration of [keys], [elements] and [entries] collections. + * This implementation makes no guarantees regarding the order of enumeration of [keys], [values] and [entries] collections. */ public open class HashMap : AbstractMutableMap { diff --git a/js/js.libraries/src/core/generated/_RangesJs.kt b/js/js.libraries/src/core/generated/_RangesJs.kt index c72c20a4e64..9ece065e5e9 100644 --- a/js/js.libraries/src/core/generated/_RangesJs.kt +++ b/js/js.libraries/src/core/generated/_RangesJs.kt @@ -536,7 +536,7 @@ public infix fun Short.until(to: Byte): IntRange { /** * Returns a range from this value up to but excluding the specified [to] value. * - * If the [to] value is less than or equal to ['\u0000'] the returned range is empty. + * If the [to] value is less than or equal to `'\u0000'` the returned range is empty. */ public infix fun Char.until(to: Char): CharRange { if (to <= '\u0000') return CharRange.EMPTY diff --git a/js/js.libraries/src/core/json.kt b/js/js.libraries/src/core/json.kt index fb2af70372d..2bd6b071894 100644 --- a/js/js.libraries/src/core/json.kt +++ b/js/js.libraries/src/core/json.kt @@ -1,7 +1,7 @@ package kotlin.js /** - * An interface for indexing access to a collection of key-value pairs, where type of key is [String] and type of value is [Any?]. + * An interface for indexing access to a collection of key-value pairs, where type of key is [String] and type of value is [Any?][Any]. */ public external interface Json { /** diff --git a/libraries/stdlib/common/src/generated/_Ranges.kt b/libraries/stdlib/common/src/generated/_Ranges.kt index 4e2b45a9e4a..d791999d478 100644 --- a/libraries/stdlib/common/src/generated/_Ranges.kt +++ b/libraries/stdlib/common/src/generated/_Ranges.kt @@ -390,7 +390,7 @@ public expect infix fun Short.until(to: Byte): IntRange /** * Returns a range from this value up to but excluding the specified [to] value. * - * If the [to] value is less than or equal to ['\u0000'] the returned range is empty. + * If the [to] value is less than or equal to `'\u0000'` the returned range is empty. */ public expect infix fun Char.until(to: Char): CharRange diff --git a/libraries/stdlib/src/generated/_Ranges.kt b/libraries/stdlib/src/generated/_Ranges.kt index f6c5b9415ed..ed896042870 100644 --- a/libraries/stdlib/src/generated/_Ranges.kt +++ b/libraries/stdlib/src/generated/_Ranges.kt @@ -536,7 +536,7 @@ public infix fun Short.until(to: Byte): IntRange { /** * Returns a range from this value up to but excluding the specified [to] value. * - * If the [to] value is less than or equal to ['\u0000'] the returned range is empty. + * If the [to] value is less than or equal to `'\u0000'` the returned range is empty. */ public infix fun Char.until(to: Char): CharRange { if (to <= '\u0000') return CharRange.EMPTY diff --git a/libraries/stdlib/src/kotlin/collections/Iterators.kt b/libraries/stdlib/src/kotlin/collections/Iterators.kt index c4dcf96eb6a..51ed1c524be 100644 --- a/libraries/stdlib/src/kotlin/collections/Iterators.kt +++ b/libraries/stdlib/src/kotlin/collections/Iterators.kt @@ -4,7 +4,7 @@ package kotlin.collections /** - * Creates an [Iterator] for an [Enumeration], allowing to use it in `for` loops. + * Creates an [Iterator] for an [java.util.Enumeration], allowing to use it in `for` loops. * @sample samples.collections.Iterators.iteratorForEnumeration */ @kotlin.jvm.JvmVersion diff --git a/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt b/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt index 09c8cf571cd..aa208f4354a 100644 --- a/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt +++ b/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt @@ -18,9 +18,7 @@ package kotlin.coroutines.experimental.intrinsics -import kotlin.coroutines.experimental.Continuation -import kotlin.coroutines.experimental.CoroutineContext -import kotlin.coroutines.experimental.processBareContinuationResume +import kotlin.coroutines.experimental.* /** * Obtains the current continuation instance inside suspend functions and either suspends @@ -68,7 +66,9 @@ public inline fun Continuation.intercepted(): Continuation = /** * Continuation context of current coroutine. * - * This allows the user code to not pass an extra [CoroutineContext] parameter in basic coroutine builders like [launch] and [async], + * This allows the user code to not pass an extra [CoroutineContext] parameter in basic coroutine builders + * like [launch](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/launch.html) + * and [async](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/async.html), * but still provide easy access to coroutine context. */ @SinceKotlin("1.2") diff --git a/libraries/stdlib/src/kotlin/io/files/Utils.kt b/libraries/stdlib/src/kotlin/io/files/Utils.kt index 08db97325a6..f9eecb51e2c 100644 --- a/libraries/stdlib/src/kotlin/io/files/Utils.kt +++ b/libraries/stdlib/src/kotlin/io/files/Utils.kt @@ -52,7 +52,7 @@ public val File.extension: String get() = name.substringAfterLast('.', "") /** - * Returns [path] of this File using the invariant separator '/' to + * Returns [path][File.path] of this File using the invariant separator '/' to * separate the names in the name sequence. */ public val File.invariantSeparatorsPath: String diff --git a/libraries/stdlib/src/kotlin/ranges/Ranges.kt b/libraries/stdlib/src/kotlin/ranges/Ranges.kt index d6ec6eb926b..602ff40de78 100644 --- a/libraries/stdlib/src/kotlin/ranges/Ranges.kt +++ b/libraries/stdlib/src/kotlin/ranges/Ranges.kt @@ -109,7 +109,7 @@ private class ClosedFloatRange ( public operator fun > T.rangeTo(that: T): ClosedRange = ComparableRange(this, that) /** - * Creates a range from this [Double] value to the specified [other] value. + * Creates a range from this [Double] value to the specified [that] value. * * Numbers are compared with the ends of this range according to IEEE-754. */ @@ -117,7 +117,7 @@ public operator fun > T.rangeTo(that: T): ClosedRange = Comp public operator fun Double.rangeTo(that: Double): ClosedFloatingPointRange = ClosedDoubleRange(this, that) /** - * Creates a range from this [Float] value to the specified [other] value. + * Creates a range from this [Float] value to the specified [that] value. * * Numbers are compared with the ends of this range according to IEEE-754. */ diff --git a/libraries/stdlib/src/kotlin/text/regex/RegexExtensions.kt b/libraries/stdlib/src/kotlin/text/regex/RegexExtensions.kt index 15fda3fde4b..c1d38bcbc1c 100644 --- a/libraries/stdlib/src/kotlin/text/regex/RegexExtensions.kt +++ b/libraries/stdlib/src/kotlin/text/regex/RegexExtensions.kt @@ -22,9 +22,9 @@ public inline fun String.toRegex(option: RegexOption): Regex = Regex(this, optio public inline fun String.toRegex(options: Set): Regex = Regex(this, options) /** - * Converts this [Pattern] to an instance of [Regex]. + * Converts this [java.util.regex.Pattern] to an instance of [Regex]. * - * Provides the way to use Regex API on the instances of [Pattern]. + * Provides the way to use Regex API on the instances of [java.util.regex.Pattern]. */ @JvmVersion @kotlin.internal.InlineOnly diff --git a/libraries/stdlib/src/kotlin/util/BigIntegers.kt b/libraries/stdlib/src/kotlin/util/BigIntegers.kt index be2a6150145..4216d2fed48 100644 --- a/libraries/stdlib/src/kotlin/util/BigIntegers.kt +++ b/libraries/stdlib/src/kotlin/util/BigIntegers.kt @@ -95,12 +95,12 @@ public inline infix fun BigInteger.or(other: BigInteger): BigInteger = this.or(o @kotlin.internal.InlineOnly public inline infix fun BigInteger.xor(other: BigInteger): BigInteger = this.xor(other) -/** Shifts this value left by [bits]. */ +/** Shifts this value left by the [n] number of bits. */ @SinceKotlin("1.2") @kotlin.internal.InlineOnly public inline infix fun BigInteger.shl(n: Int): BigInteger = this.shiftLeft(n) -/** Shifts this value right by [bits], filling the leftmost bits with copies of the sign bit. */ +/** Shifts this value right by the [n] number of bits, filling the leftmost bits with copies of the sign bit. */ @SinceKotlin("1.2") @kotlin.internal.InlineOnly public inline infix fun BigInteger.shr(n: Int): BigInteger = this.shiftRight(n) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt index a7755b6b1cf..91345f0cf4b 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Ranges.kt @@ -105,13 +105,14 @@ object RangeOps : TemplateGroupBase() { val progressionType = elementType.name + "Range" returns(progressionType) val minValue = if (elementType == PrimitiveType.Char) "'\\u0000'" else "$elementType.MIN_VALUE" + val minValueRef = if (elementType == PrimitiveType.Char) "`$minValue`" else "[$minValue]" doc { """ Returns a range from this value up to but excluding the specified [to] value. ${textWhen(elementType == toType) { - "If the [to] value is less than or equal to [$minValue] the returned range is empty." + "If the [to] value is less than or equal to $minValueRef the returned range is empty." }} """ }