[FIR] Update diagnostic messages
This commit is contained in:
committed by
Space Team
parent
6cd9b5ec98
commit
de1c92a32f
+25
-25
@@ -42,49 +42,49 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.native.FirNativeErrors.UNCH
|
||||
|
||||
object FirNativeErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
override val MAP = KtDiagnosticFactoryToRendererMap("FIR").also { map ->
|
||||
map.put(THROWS_LIST_EMPTY, "Throws must have non-empty class list")
|
||||
map.put(INCOMPATIBLE_THROWS_OVERRIDE, "Member overrides different @Throws filter from {0}", SYMBOL)
|
||||
map.put(INCOMPATIBLE_THROWS_INHERITED, "Member inherits different @Throws filters from {0}", SYMBOLS)
|
||||
map.put(THROWS_LIST_EMPTY, "Throws must have a non-empty class list.")
|
||||
map.put(INCOMPATIBLE_THROWS_OVERRIDE, "Member overrides different ''@Throws'' filter from ''{0}''.", SYMBOL)
|
||||
map.put(INCOMPATIBLE_THROWS_INHERITED, "Member inherits different ''@Throws'' filters from ''{0}''.", SYMBOLS)
|
||||
map.put(
|
||||
MISSING_EXCEPTION_IN_THROWS_ON_SUSPEND, "@Throws on suspend declaration must have {0} (or any of its superclasses) listed",
|
||||
MISSING_EXCEPTION_IN_THROWS_ON_SUSPEND, "''@Throws'' on suspend declaration must have ''{0}'' (or any of its superclasses) listed.",
|
||||
TO_STRING
|
||||
)
|
||||
map.put(
|
||||
INAPPLICABLE_SHARED_IMMUTABLE_PROPERTY,
|
||||
"@SharedImmutable is applicable only to val with backing field or to property with delegation"
|
||||
"'@SharedImmutable' is applicable only to 'val' with backing field or to property with delegation."
|
||||
)
|
||||
map.put(INAPPLICABLE_SHARED_IMMUTABLE_TOP_LEVEL, "@SharedImmutable is applicable only to top level declarations")
|
||||
map.put(INAPPLICABLE_SHARED_IMMUTABLE_TOP_LEVEL, "'@SharedImmutable' is applicable only to top-level declarations.")
|
||||
map.put(
|
||||
INAPPLICABLE_THREAD_LOCAL,
|
||||
"@ThreadLocal is applicable only to property with backing field, to property with delegation or to objects"
|
||||
"'@ThreadLocal' is applicable only to property with backing field, to property with delegation, or to objects."
|
||||
)
|
||||
map.put(INAPPLICABLE_THREAD_LOCAL_TOP_LEVEL, "@ThreadLocal is applicable only to top level declarations")
|
||||
map.put(INVALID_CHARACTERS_NATIVE, "Name {0}", TO_STRING)
|
||||
map.put(REDUNDANT_SWIFT_REFINEMENT, "An ObjC refined declaration can't also be refined in Swift")
|
||||
map.put(INAPPLICABLE_THREAD_LOCAL_TOP_LEVEL, "'@ThreadLocal' is applicable only to top-level declarations.")
|
||||
map.put(INVALID_CHARACTERS_NATIVE, "Name {0}.", TO_STRING)
|
||||
map.put(REDUNDANT_SWIFT_REFINEMENT, "ObjC refined declarations cannot be refined in Swift.")
|
||||
map.put(
|
||||
INCOMPATIBLE_OBJC_REFINEMENT_OVERRIDE,
|
||||
"Refined declaration \"{0}\" overrides declarations with different or no refinement from {1}",
|
||||
"Refined declaration ''{0}'' overrides declarations with different or no refinement from ''{1}''.",
|
||||
SYMBOL,
|
||||
SYMBOLS
|
||||
)
|
||||
map.put(
|
||||
INVALID_OBJC_HIDES_TARGETS,
|
||||
"@HidesFromObjC annotation is only applicable to annotations with targets CLASS, FUNCTION and/or PROPERTY"
|
||||
"'@HidesFromObjC' annotation is only applicable to annotations with targets CLASS, FUNCTION, and/or PROPERTY."
|
||||
)
|
||||
map.put(
|
||||
INVALID_REFINES_IN_SWIFT_TARGETS,
|
||||
"@RefinesInSwift annotation is only applicable to annotations with targets FUNCTION and/or PROPERTY"
|
||||
"'@RefinesInSwift' annotation is only applicable to annotations with targets FUNCTION and/or PROPERTY."
|
||||
)
|
||||
map.put(INAPPLICABLE_OBJC_NAME, "@ObjCName is not applicable on overrides")
|
||||
map.put(INVALID_OBJC_NAME, "@ObjCName should have a name and/or swiftName")
|
||||
map.put(EMPTY_OBJC_NAME, "Empty @ObjCName names aren't supported")
|
||||
map.put(INVALID_OBJC_NAME_CHARS, "@ObjCName contains illegal characters: {0}", TO_STRING)
|
||||
map.put(INVALID_OBJC_NAME_FIRST_CHAR, "@ObjCName contains illegal first characters: {0}", TO_STRING)
|
||||
map.put(INCOMPATIBLE_OBJC_NAME_OVERRIDE, "Member \"{0}\" inherits inconsistent @ObjCName from {1}", SYMBOL, SYMBOLS)
|
||||
map.put(INAPPLICABLE_EXACT_OBJC_NAME, "Exact @ObjCName is only applicable to classes, objects and interfaces")
|
||||
map.put(MISSING_EXACT_OBJC_NAME, "Exact @ObjCName is required to have an ObjC name")
|
||||
map.put(NON_LITERAL_OBJC_NAME_ARG, "@ObjCName accepts only literal string and boolean values")
|
||||
map.put(SUBTYPE_OF_HIDDEN_FROM_OBJC, "Only @HiddenFromObjC declaration can be a subtype of @HiddenFromObjC declaration")
|
||||
map.put(INAPPLICABLE_OBJC_NAME, "'@ObjCName' is not applicable to overrides.")
|
||||
map.put(INVALID_OBJC_NAME, "'@ObjCName' should have a name and/or swiftName.")
|
||||
map.put(EMPTY_OBJC_NAME, "Empty '@ObjCName' names aren't supported.")
|
||||
map.put(INVALID_OBJC_NAME_CHARS, "''@ObjCName'' contains illegal characters ''{0}''.", TO_STRING)
|
||||
map.put(INVALID_OBJC_NAME_FIRST_CHAR, "''@ObjCName'' contains illegal first characters ''{0}''.", TO_STRING)
|
||||
map.put(INCOMPATIBLE_OBJC_NAME_OVERRIDE, "Member ''{0}'' inherits inconsistent ''@ObjCName'' from ''{1}''.", SYMBOL, SYMBOLS)
|
||||
map.put(INAPPLICABLE_EXACT_OBJC_NAME, "Exact '@ObjCName' is only applicable to classes, objects, and interfaces.")
|
||||
map.put(MISSING_EXACT_OBJC_NAME, "Exact '@ObjCName' is required to have an ObjC name.")
|
||||
map.put(NON_LITERAL_OBJC_NAME_ARG, "'@ObjCName' accepts only literal 'String' and 'Boolean' values.")
|
||||
map.put(SUBTYPE_OF_HIDDEN_FROM_OBJC, "Only '@HiddenFromObjC' declaration can be a subtype of '@HiddenFromObjC' declaration.")
|
||||
|
||||
|
||||
map.put(
|
||||
@@ -100,12 +100,12 @@ object FirNativeErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
)
|
||||
map.put(
|
||||
FORWARD_DECLARATION_AS_REIFIED_TYPE_ARGUMENT,
|
||||
"Cannot pass forward declaration ''{0}'' for reified type parameter",
|
||||
"Cannot pass forward declaration ''{0}'' for reified type parameter.",
|
||||
FirDiagnosticRenderers.RENDER_TYPE
|
||||
)
|
||||
map.put(
|
||||
FORWARD_DECLARATION_AS_CLASS_LITERAL,
|
||||
"Can't refer to forward declaration ''{0}'' from class literal",
|
||||
"Cannot refer to forward declaration ''{0}'' from class literal.",
|
||||
FirDiagnosticRenderers.RENDER_TYPE
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user