From 5493bf39da2b652756f47716a2411496d0d77aa1 Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 8 Apr 2020 14:43:30 +0800 Subject: [PATCH] Fix build --- .../net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt index a39f09a11..e9aebcefa 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/QQAndroidBot.common.kt @@ -70,7 +70,7 @@ internal fun Bot.asQQAndroidBot(): QQAndroidBot { return this as QQAndroidBot } -@Suppress("INVISIBLE_MEMBER") +@Suppress("INVISIBLE_MEMBER", "BooleanLiteralArgument") @OptIn(MiraiInternalAPI::class) internal class QQAndroidBot constructor( context: Context, @@ -80,7 +80,7 @@ internal class QQAndroidBot constructor( @OptIn(LowLevelAPI::class) override suspend fun acceptNewFriendRequest(event: NewFriendRequestEvent) { - check(event.responded.compareAndSet(expect = false, update = true)) { + check(event.responded.compareAndSet(false, true)) { "the request $this has already been responded" } @@ -98,7 +98,7 @@ internal class QQAndroidBot constructor( } override suspend fun rejectNewFriendRequest(event: NewFriendRequestEvent, blackList: Boolean) { - check(event.responded.compareAndSet(expect = false, update = true)) { + check(event.responded.compareAndSet(false, true)) { "the request $this has already been responded" } @@ -114,7 +114,7 @@ internal class QQAndroidBot constructor( @OptIn(LowLevelAPI::class) override suspend fun acceptMemberJoinRequest(event: MemberJoinRequestEvent) { - check(event.responded.compareAndSet(expect = false, update = true)) { + check(event.responded.compareAndSet(false, true)) { "the request $this has already been responded" } @@ -137,7 +137,7 @@ internal class QQAndroidBot constructor( @OptIn(LowLevelAPI::class) override suspend fun rejectMemberJoinRequest(event: MemberJoinRequestEvent, blackList: Boolean) { - check(event.responded.compareAndSet(expect = false, update = true)) { + check(event.responded.compareAndSet(false, true)) { "the request $this has already been responded" } network.run { @@ -152,7 +152,7 @@ internal class QQAndroidBot constructor( override suspend fun ignoreMemberJoinRequest(event: MemberJoinRequestEvent, blackList: Boolean) { - check(event.responded.compareAndSet(expect = false, update = true)) { + check(event.responded.compareAndSet(false, true)) { "the request $this has already been responded" } network.run {