From 8dabeba40d43eae819d3ab62adfcfc7956e20a3f Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 4 Mar 2020 21:21:23 +0800 Subject: [PATCH] Fix reference --- mirai-core-qqandroid/build.gradle.kts | 2 +- .../commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt | 2 +- .../commonMain/kotlin/net.mamoe.mirai/utils/ExternalImage.kt | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mirai-core-qqandroid/build.gradle.kts b/mirai-core-qqandroid/build.gradle.kts index 128e2884a..7f747935b 100644 --- a/mirai-core-qqandroid/build.gradle.kts +++ b/mirai-core-qqandroid/build.gradle.kts @@ -103,7 +103,7 @@ kotlin { dependencies { runtimeOnly(files("build/classes/kotlin/jvm/main")) // classpath is not properly set by IDE api(kotlinx("serialization-runtime", serializationVersion)) - api(kotlinx("serialization-protobuf", serializationVersion)) + //api(kotlinx("serialization-protobuf", serializationVersion)) } } diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt index 4b7812ba9..b1ee9c6fd 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt @@ -358,7 +358,7 @@ internal class MemberInfoImpl( override val muteTimestamp: Int = jceInfo.dwShutupTimestap?.toInt() ?: 0 } -@OptIn(ExperimentalContracts::class) +@UseExperimental(ExperimentalContracts::class) internal fun GroupImpl.Companion.checkIsInstance(expression: Boolean) { contract { returns() implies expression diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/ExternalImage.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/ExternalImage.kt index b14b5b137..527c76ec5 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/ExternalImage.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/ExternalImage.kt @@ -15,7 +15,6 @@ import io.ktor.utils.io.ByteReadChannel import io.ktor.utils.io.core.ByteReadPacket import io.ktor.utils.io.core.Input import kotlinx.io.InputStream -import kotlinx.serialization.InternalSerializationApi import net.mamoe.mirai.contact.Contact import net.mamoe.mirai.contact.Group import net.mamoe.mirai.contact.QQ @@ -70,7 +69,6 @@ class ExternalImage private constructor( filename: String ) : this(width, height, md5, imageFormat, input as Any, input.remaining, filename) - @OptIn(InternalSerializationApi::class) constructor( width: Int, height: Int,