[FIR] Add description to ERROR_IN_CONTRACT_DESCRIPTION
#KT-49084 Fixed
This commit is contained in:
committed by
Space Team
parent
0c4603f3e5
commit
28eb78fe16
+1
-1
@@ -2267,7 +2267,7 @@ object FirErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
|
||||
map.put(EXPRESSION_EXPECTED_PACKAGE_FOUND, "Expression expected, but package name found.")
|
||||
|
||||
// Function contracts
|
||||
map.put(ERROR_IN_CONTRACT_DESCRIPTION, "Error in contract description.", TO_STRING)
|
||||
map.put(ERROR_IN_CONTRACT_DESCRIPTION, "Error in contract description: {0}", TO_STRING)
|
||||
map.put(CONTRACT_NOT_ALLOWED, "{0}", TO_STRING)
|
||||
|
||||
// Conventions
|
||||
|
||||
+5
-5
@@ -175,27 +175,27 @@ object ConeVariableExpectedError : ConeDiagnostic {
|
||||
sealed class ConeContractDescriptionError : ConeDiagnostic {
|
||||
class IllegalElement(val element: FirElement) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "Illegal element in contract description"
|
||||
get() = "illegal element in contract description"
|
||||
}
|
||||
|
||||
class UnresolvedCall(val name: Name) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "Unresolved call in contract description: ${name.asString()}"
|
||||
get() = "unresolved call in contract description: ${name.asString()}"
|
||||
}
|
||||
|
||||
class NoReceiver(val name: Name) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "No receiver for call ${name.asString()} found"
|
||||
get() = "no receiver for call '${name.asString()}' found"
|
||||
}
|
||||
|
||||
class NoArgument(val name: Name) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "No argument for call ${name.asString()} found"
|
||||
get() = "no argument for call '${name.asString()}' found"
|
||||
}
|
||||
|
||||
class NotAConstant(val element: Any) : ConeContractDescriptionError() {
|
||||
override val reason: String
|
||||
get() = "$element is not a constant reference"
|
||||
get() = "'$element' is not a constant reference"
|
||||
}
|
||||
|
||||
class IllegalConst(
|
||||
|
||||
Reference in New Issue
Block a user