Suppress code warnings in kotlin-stdlib
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("StringsKt")
|
||||
@file:Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
||||
|
||||
package kotlin.text
|
||||
|
||||
|
||||
@@ -299,7 +299,6 @@ public inline fun <R, T : R> Result<T>.recover(transform: (exception: Throwable)
|
||||
@InlineOnly
|
||||
@SinceKotlin("1.3")
|
||||
public inline fun <R, T : R> Result<T>.recoverCatching(transform: (exception: Throwable) -> R): Result<R> {
|
||||
val value = value // workaround for inline classes BE bug
|
||||
return when (val exception = exceptionOrNull()) {
|
||||
null -> this
|
||||
else -> runCatching { transform(exception) }
|
||||
|
||||
Reference in New Issue
Block a user