Rename SuccessOrFailure to Result and hide Failure from ABI
* The members of Result are isSuccess, isFailure, exceptionOrNull, getOrNull * The rest of API is implemented via inline-only extensions * There are two internal functions to hide detailed mechanics of an internal Result.Failure class: createFailure and throwOnFailure * Result.toString is explicit: either Success(v) or Failure(x) See KT-26538
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resumeWith(SuccessOrFailure.success("OK"))
|
||||
x.resumeWith(Result.success("OK"))
|
||||
}
|
||||
|
||||
suspend fun suspendThere(param: Int, param2: String, param3: Long): String {
|
||||
|
||||
Reference in New Issue
Block a user