Skip to content

Commit 12eb6d9

Browse files
merfemorSpace Team
authored and
Space Team
committed
[Stdlib] Remove @InlineOnly from expect declarations of minOf(), maxOf()
to satisfy MPP annotation checker. It has reporting because @InlineOnly is absent on declarations with Long parameter (removed in 233376e). ^KT-58551
1 parent 6611a55 commit 12eb6d9

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

libraries/stdlib/common/src/generated/_Comparisons.kt

-12
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,24 @@ public expect fun <T : Comparable<T>> maxOf(a: T, b: T): T
2727
* Returns the greater of two values.
2828
*/
2929
@SinceKotlin("1.1")
30-
@kotlin.internal.InlineOnly
3130
public expect inline fun maxOf(a: Byte, b: Byte): Byte
3231

3332
/**
3433
* Returns the greater of two values.
3534
*/
3635
@SinceKotlin("1.1")
37-
@kotlin.internal.InlineOnly
3836
public expect inline fun maxOf(a: Short, b: Short): Short
3937

4038
/**
4139
* Returns the greater of two values.
4240
*/
4341
@SinceKotlin("1.1")
44-
@kotlin.internal.InlineOnly
4542
public expect inline fun maxOf(a: Int, b: Int): Int
4643

4744
/**
4845
* Returns the greater of two values.
4946
*/
5047
@SinceKotlin("1.1")
51-
@kotlin.internal.InlineOnly
5248
public expect inline fun maxOf(a: Long, b: Long): Long
5349

5450
/**
@@ -57,7 +53,6 @@ public expect inline fun maxOf(a: Long, b: Long): Long
5753
* If either value is `NaN`, returns `NaN`.
5854
*/
5955
@SinceKotlin("1.1")
60-
@kotlin.internal.InlineOnly
6156
public expect inline fun maxOf(a: Float, b: Float): Float
6257

6358
/**
@@ -66,7 +61,6 @@ public expect inline fun maxOf(a: Float, b: Float): Float
6661
* If either value is `NaN`, returns `NaN`.
6762
*/
6863
@SinceKotlin("1.1")
69-
@kotlin.internal.InlineOnly
7064
public expect inline fun maxOf(a: Double, b: Double): Double
7165

7266
/**
@@ -215,28 +209,24 @@ public expect fun <T : Comparable<T>> minOf(a: T, b: T): T
215209
* Returns the smaller of two values.
216210
*/
217211
@SinceKotlin("1.1")
218-
@kotlin.internal.InlineOnly
219212
public expect inline fun minOf(a: Byte, b: Byte): Byte
220213

221214
/**
222215
* Returns the smaller of two values.
223216
*/
224217
@SinceKotlin("1.1")
225-
@kotlin.internal.InlineOnly
226218
public expect inline fun minOf(a: Short, b: Short): Short
227219

228220
/**
229221
* Returns the smaller of two values.
230222
*/
231223
@SinceKotlin("1.1")
232-
@kotlin.internal.InlineOnly
233224
public expect inline fun minOf(a: Int, b: Int): Int
234225

235226
/**
236227
* Returns the smaller of two values.
237228
*/
238229
@SinceKotlin("1.1")
239-
@kotlin.internal.InlineOnly
240230
public expect inline fun minOf(a: Long, b: Long): Long
241231

242232
/**
@@ -245,7 +235,6 @@ public expect inline fun minOf(a: Long, b: Long): Long
245235
* If either value is `NaN`, returns `NaN`.
246236
*/
247237
@SinceKotlin("1.1")
248-
@kotlin.internal.InlineOnly
249238
public expect inline fun minOf(a: Float, b: Float): Float
250239

251240
/**
@@ -254,7 +243,6 @@ public expect inline fun minOf(a: Float, b: Float): Float
254243
* If either value is `NaN`, returns `NaN`.
255244
*/
256245
@SinceKotlin("1.1")
257-
@kotlin.internal.InlineOnly
258246
public expect inline fun minOf(a: Double, b: Double): Double
259247

260248
/**

libraries/tools/kotlin-stdlib-gen/src/templates/Comparables.kt

+6
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ object ComparableOps : TemplateGroupBase() {
180180
body { "return $defaultImpl" }
181181
specialFor(Primitives) {
182182
inlineOnly()
183+
on(Platform.Common) {
184+
inline()
185+
}
183186
var convertBack = "to$primitive()"
184187
on(Platform.JS) {
185188
convertBack = "unsafeCast<$primitive>()"
@@ -381,6 +384,9 @@ object ComparableOps : TemplateGroupBase() {
381384
body { "return $defaultImpl" }
382385
specialFor(Primitives) {
383386
inlineOnly()
387+
on(Platform.Common) {
388+
inline()
389+
}
384390
var convertBack = "to$primitive()"
385391
on(Platform.JS) {
386392
convertBack = "unsafeCast<$primitive>()"

0 commit comments

Comments
 (0)