Fix compiler warnings

This commit is contained in:
Him188
2022-06-14 12:45:46 +01:00
parent 21c4a5ba04
commit f962618bee
8 changed files with 12 additions and 22 deletions

View File

@@ -55,7 +55,7 @@ class MiraiModuleBuilder : StarterModuleBuilder() {
override fun createWizardSteps(
wizardContext: WizardContext,
context: WizardContext,
modulesProvider: ModulesProvider
): Array<ModuleWizardStep> = emptyArray()

View File

@@ -90,7 +90,7 @@ public expect fun GzipDecompressionInput(source: Input): Input
/**
* @see GzipDecompressionInput
*/
public inline fun Input.gzipDecompressionInput(): Input = GzipDecompressionInput(this)
public fun Input.gzipDecompressionInput(): Input = GzipDecompressionInput(this)
/**
* [source] will be closed on returned [Input.close]
@@ -101,7 +101,7 @@ public expect fun InflateInput(source: Input): Input
/**
* @see InflateInput
*/
public inline fun Input.inflateInput(): Input = InflateInput(this)
public fun Input.inflateInput(): Input = InflateInput(this)
/**
* [source] will be closed on returned [Input.close]
@@ -112,4 +112,4 @@ public expect fun DeflateInput(source: Input): Input
/**
* @see DeflateInput
*/
public inline fun Input.deflateInput(): Input = DeflateInput(this)
public fun Input.deflateInput(): Input = DeflateInput(this)

View File

@@ -25,6 +25,7 @@ internal class WindowsMiraiFileImplTest : AbstractNativeMiraiFileImplTest() {
super.parent()
}
@Test
override fun `canonical paths for non-canonical input`() {
super.`canonical paths for non-canonical input`()

View File

@@ -28,6 +28,7 @@ internal class UnixMiraiFileImplTest : AbstractNativeMiraiFileImplTest() {
super.parent()
}
@Test
override fun `canonical paths for non-canonical input`() {
super.`canonical paths for non-canonical input`()

View File

@@ -35,6 +35,7 @@ internal fun FileMessage.checkIsImpl(): FileMessageImpl {
}
@Serializable
@Suppress("ANNOTATION_ARGUMENT_MUST_BE_CONST") // bug
@SerialName(FileMessage.SERIAL_NAME)
internal data class FileMessageImpl(
override val id: String,

View File

@@ -43,8 +43,6 @@ open class TM(private val name: String = Random.nextInt().toString()) : SingleMe
if (this === other) return true
if (!isSameType(this, other)) return false
other as TM
if (name != other.name) return false
return true
@@ -74,17 +72,6 @@ private fun testRefineLight(
) = assertEquals(after.toMessageChain(), before.toMessageChain().refineLight(bot))
@Suppress("TestFunctionName")
private fun RefinableMessage(
refine: (bot: Bot, context: MessageChain) -> Message?
): RefinableMessage {
return object : RefinableMessage, TM() {
override fun tryRefine(bot: Bot, context: MessageChain, refineContext: RefineContext): Message? {
return refine(bot, context)
}
}
}
@Suppress("TestFunctionName")
private fun RefinableMessage0(
refine: () -> Message?

View File

@@ -15,7 +15,6 @@ import net.mamoe.mirai.data.GroupInfo
import net.mamoe.mirai.internal.QQAndroidBot
import net.mamoe.mirai.internal.utils.RemoteFileImpl
import net.mamoe.mirai.utils.DeprecatedSinceMirai
import net.mamoe.mirai.utils.RemoteFile
import kotlin.coroutines.CoroutineContext
internal actual class GroupImpl actual constructor(
@@ -30,5 +29,5 @@ internal actual class GroupImpl actual constructor(
@Suppress("DEPRECATION")
@Deprecated("Please use files instead.", replaceWith = ReplaceWith("files.root"), level = DeprecationLevel.WARNING)
@DeprecatedSinceMirai(warningSince = "2.8")
override val filesRoot: RemoteFile by lazy { RemoteFileImpl(this, "/") }
override val filesRoot: net.mamoe.mirai.utils.RemoteFile by lazy { RemoteFileImpl(this, "/") }
}

View File

@@ -12,15 +12,16 @@ package net.mamoe.mirai.internal.testFramework
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
@Suppress("UNUSED_PARAMETER", "unused")
internal actual object DebugProbes {
/**
* Prints [job] hierarchy representation from [jobToString] to the given [out].
* Prints hierarchy representation from [jobToString] to the given .
*/
// public fun printJob(job: Job, out: PrintStream = System.out): Unit
/**
* Prints all coroutines launched within the given [scope].
* Prints all coroutines launched within the given .
* Throws [IllegalStateException] if the scope has no a job in it.
*/
// public fun printScope(scope: CoroutineScope, out: PrintStream = System.out): Unit
@@ -113,7 +114,7 @@ internal actual object DebugProbes {
}
/**
* Prints [job] hierarchy representation from [jobToString] to the given [out].
* Prints [job] hierarchy representation from [jobToString] to the given .
*/
actual fun printJob(job: Job) {
}