diff --git a/mirai-console/backend/mirai-console/src/command/resolve/CommandCallInterceptor.kt b/mirai-console/backend/mirai-console/src/command/resolve/CommandCallInterceptor.kt index 845e3503d..4c2a534ff 100644 --- a/mirai-console/backend/mirai-console/src/command/resolve/CommandCallInterceptor.kt +++ b/mirai-console/backend/mirai-console/src/command/resolve/CommandCallInterceptor.kt @@ -147,8 +147,8 @@ public inline fun InterceptResult.fold( callsInPlace(onIntercepted, InvocationKind.AT_MOST_ONCE) callsInPlace(otherwise, InvocationKind.AT_MOST_ONCE) } - value?.let(otherwise) - reason?.let(onIntercepted) + value?.let { return otherwise(it) } + reason?.let { return onIntercepted(it) } UNREACHABLE_CLAUSE }