Skip to content

Commit 97f5886

Browse files
committed
Fix build failure caused by different compiler API versions
1 parent aea931e commit 97f5886

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mirai-console/tools/intellij-plugin/src/diagnostics/ContextualParametersChecker.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import net.mamoe.mirai.console.intellij.util.RequirementParser
2828
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
2929
import org.jetbrains.kotlin.diagnostics.Diagnostic
3030
import org.jetbrains.kotlin.idea.inspections.collections.isCalling
31-
import org.jetbrains.kotlin.psi.KtElement
3231
import org.jetbrains.kotlin.psi.KtReferenceExpression
3332
import org.jetbrains.kotlin.psi.ValueArgument
3433
import org.jetbrains.kotlin.resolve.calls.checkers.CallChecker
@@ -116,7 +115,7 @@ class ContextualParametersChecker : CallChecker {
116115
"插件 Id '$value' 无效. 插件 Id 必须同时包含 groupId 和插件名称. $syntax"
117116
)
118117

119-
val lowercaseId = value.lowercase()
118+
val lowercaseId = value.toLowerCase()
120119

121120
if (ID_REGEX.matchEntire(value) == null) {
122121
return ILLEGAL_PLUGIN_DESCRIPTION.on(
@@ -133,7 +132,7 @@ class ContextualParametersChecker : CallChecker {
133132

134133
fun checkPluginName(inspectionTarget: PsiElement, value: String): Diagnostic? {
135134
if (value.isBlank()) return ILLEGAL_PLUGIN_DESCRIPTION.on(inspectionTarget, "插件名不能为空")
136-
val lowercaseName = value.lowercase()
135+
val lowercaseName = value.toLowerCase()
137136
FORBIDDEN_ID_NAMES.firstOrNull { it == lowercaseName }?.let { illegal ->
138137
return ILLEGAL_PLUGIN_DESCRIPTION.on(inspectionTarget, "'$illegal' 不允许作为插件名. 确保插件名不完全是这个名称")
139138
}

0 commit comments

Comments
 (0)