diff --git a/js/js.libraries/src/core/generated/_RangesJs.kt b/js/js.libraries/src/core/generated/_RangesJs.kt index a10c447ac29..3d435db167b 100644 --- a/js/js.libraries/src/core/generated/_RangesJs.kt +++ b/js/js.libraries/src/core/generated/_RangesJs.kt @@ -868,6 +868,7 @@ public fun Double.coerceIn(minimumValue: Double, maximumValue: Double): Double { * * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ +@SinceKotlin("1.1") public fun > T.coerceIn(range: ClosedFloatingPointRange): T { if (range.isEmpty()) throw IllegalArgumentException("Cannot coerce value to an empty range: $range.") return when { diff --git a/libraries/stdlib/common/src/generated/_Ranges.kt b/libraries/stdlib/common/src/generated/_Ranges.kt index 37f8ef23c01..d685e0fc0d6 100644 --- a/libraries/stdlib/common/src/generated/_Ranges.kt +++ b/libraries/stdlib/common/src/generated/_Ranges.kt @@ -620,6 +620,7 @@ public header fun Double.coerceIn(minimumValue: Double, maximumValue: Double): D * * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ +@SinceKotlin("1.1") public header fun > T.coerceIn(range: ClosedFloatingPointRange): T /** diff --git a/libraries/stdlib/src/generated/_Ranges.kt b/libraries/stdlib/src/generated/_Ranges.kt index ae868886be3..f6c5b9415ed 100644 --- a/libraries/stdlib/src/generated/_Ranges.kt +++ b/libraries/stdlib/src/generated/_Ranges.kt @@ -869,6 +869,7 @@ public fun Double.coerceIn(minimumValue: Double, maximumValue: Double): Double { * * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`. */ +@SinceKotlin("1.1") public fun > T.coerceIn(range: ClosedFloatingPointRange): T { if (range.isEmpty()) throw IllegalArgumentException("Cannot coerce value to an empty range: $range.") return when { diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Comparables.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Comparables.kt index 1d885f650a3..e5e4a9ef603 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Comparables.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Comparables.kt @@ -90,6 +90,7 @@ fun comparables(): List { templates add f("coerceIn(range: ClosedFloatingPointRange)") { sourceFile(SourceFile.Ranges) only(Generic) + since("1.1") returns("SELF") typeParam("T: Comparable") doc {