diff --git a/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt b/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt index 03d21ea9e..4b604bcf8 100644 --- a/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt +++ b/tools/compiler-common/src/diagnostics/MiraiConsoleErrors.kt @@ -14,45 +14,44 @@ import org.jetbrains.kotlin.diagnostics.DiagnosticFactory1.create import org.jetbrains.kotlin.diagnostics.DiagnosticFactory2.create import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.diagnostics.Severity.ERROR +import org.jetbrains.kotlin.psi.KtCallExpression import org.jetbrains.kotlin.psi.KtNamedDeclaration object MiraiConsoleErrors { - @JvmStatic + @JvmField val ILLEGAL_PLUGIN_DESCRIPTION = create(ERROR) - @JvmStatic - val NOT_CONSTRUCTABLE_TYPE = create(ERROR) + @JvmField + val NOT_CONSTRUCTABLE_TYPE = create(ERROR) - @JvmStatic + @JvmField val UNSERIALIZABLE_TYPE = create(ERROR) - @JvmStatic + @JvmField val ILLEGAL_COMMAND_NAME = create(ERROR) - @JvmStatic + @JvmField val ILLEGAL_PERMISSION_NAME = create(ERROR) - @JvmStatic + @JvmField val ILLEGAL_PERMISSION_ID = create(ERROR) - @JvmStatic + @JvmField val ILLEGAL_PERMISSION_NAMESPACE = create(ERROR) - @JvmStatic + @JvmField val ILLEGAL_COMMAND_REGISTER_USE = create(ERROR) - @JvmStatic + @JvmField val ILLEGAL_PERMISSION_REGISTER_USE = create(ERROR) @Suppress("ObjectPropertyName", "unused") - @JvmStatic + @JvmField @Deprecated("", level = DeprecationLevel.ERROR) - val _init: Any = object : Any() { - init { - Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages( - MiraiConsoleErrors::class.java, - MiraiConsoleErrorsRendering - ) - } + val _init: Any = run { + Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages( + MiraiConsoleErrors::class.java, + MiraiConsoleErrorsRendering + ) } } \ No newline at end of file