[FE] Move diagnostic parameter renderers to common module

This commit is contained in:
Dmitriy Novozhilov
2021-09-09 10:26:00 +03:00
committed by TeamCityServer
parent c32aecb7ae
commit 0260bf8767
11 changed files with 85 additions and 84 deletions
@@ -5,10 +5,7 @@
package org.jetbrains.kotlin.resolve.konan.diagnostics
import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages
import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap
import org.jetbrains.kotlin.diagnostics.rendering.Renderer
import org.jetbrains.kotlin.diagnostics.rendering.Renderers
import org.jetbrains.kotlin.diagnostics.rendering.*
private val DIAGNOSTIC_FACTORY_TO_RENDERER by lazy {
DiagnosticFactoryToRendererMap("Native").apply {
@@ -19,7 +16,7 @@ private val DIAGNOSTIC_FACTORY_TO_RENDERER by lazy {
)
put(
ErrorsNative.INCOMPATIBLE_THROWS_INHERITED, "Member inherits different @Throws filters from {0}",
Renderers.commaSeparated(Renderers.NAME)
CommonRenderers.commaSeparated(Renderers.NAME)
)
put(
ErrorsNative.MISSING_EXCEPTION_IN_THROWS_ON_SUSPEND,
@@ -41,7 +38,7 @@ private val DIAGNOSTIC_FACTORY_TO_RENDERER by lazy {
"@ThreadLocal is applicable only to property with backing field, to property with delegation or to objects"
)
put(ErrorsNative.INAPPLICABLE_THREAD_LOCAL_TOP_LEVEL, "@ThreadLocal is applicable only to top level declarations")
put(ErrorsNative.INVALID_CHARACTERS_NATIVE, "Name {0}", Renderers.STRING);
put(ErrorsNative.INVALID_CHARACTERS_NATIVE, "Name {0}", CommonRenderers.STRING);
}
}