[FIR] Add illegal underscore diagnostic
This commit is contained in:
+1
@@ -70,6 +70,7 @@ class ErrorNodeDiagnosticCollectorComponent(collector: AbstractDiagnosticCollect
|
|||||||
ReturnNotAllowed -> FirErrors.RETURN_NOT_ALLOWED
|
ReturnNotAllowed -> FirErrors.RETURN_NOT_ALLOWED
|
||||||
UnresolvedLabel -> FirErrors.UNRESOLVED_LABEL
|
UnresolvedLabel -> FirErrors.UNRESOLVED_LABEL
|
||||||
IllegalConstExpression -> FirErrors.ILLEGAL_CONST_EXPRESSION
|
IllegalConstExpression -> FirErrors.ILLEGAL_CONST_EXPRESSION
|
||||||
|
IllegalUnderscore -> FirErrors.ILLEGAL_UNDERSCORE
|
||||||
DeserializationError -> FirErrors.DESERIALIZATION_ERROR
|
DeserializationError -> FirErrors.DESERIALIZATION_ERROR
|
||||||
InferenceError -> FirErrors.INFERENCE_ERROR
|
InferenceError -> FirErrors.INFERENCE_ERROR
|
||||||
TypeParameterAsSupertype -> FirErrors.TYPE_PARAMETER_AS_SUPERTYPE
|
TypeParameterAsSupertype -> FirErrors.TYPE_PARAMETER_AS_SUPERTYPE
|
||||||
|
|||||||
+2
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_PROPERTY_
|
|||||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_RECEIVER_TYPE
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_RECEIVER_TYPE
|
||||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_TYPEALIAS_EXPANDED_TYPE
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_TYPEALIAS_EXPANDED_TYPE
|
||||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_CONST_EXPRESSION
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_CONST_EXPRESSION
|
||||||
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_UNDERSCORE
|
||||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INAPPLICABLE_CANDIDATE
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INAPPLICABLE_CANDIDATE
|
||||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INCOMPATIBLE_MODIFIERS
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INCOMPATIBLE_MODIFIERS
|
||||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INFERENCE_ERROR
|
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INFERENCE_ERROR
|
||||||
@@ -53,6 +54,7 @@ class FirDefaultErrorMessages : DefaultErrorMessages.Extension {
|
|||||||
map.put(SYNTAX_ERROR, "Syntax error")
|
map.put(SYNTAX_ERROR, "Syntax error")
|
||||||
map.put(UNRESOLVED_LABEL, "Unresolved label")
|
map.put(UNRESOLVED_LABEL, "Unresolved label")
|
||||||
map.put(ILLEGAL_CONST_EXPRESSION, "Illegal const expression")
|
map.put(ILLEGAL_CONST_EXPRESSION, "Illegal const expression")
|
||||||
|
map.put(ILLEGAL_UNDERSCORE, "Illegal underscore")
|
||||||
map.put(DESERIALIZATION_ERROR, "Deserialization error")
|
map.put(DESERIALIZATION_ERROR, "Deserialization error")
|
||||||
map.put(INFERENCE_ERROR, "Inference error")
|
map.put(INFERENCE_ERROR, "Inference error")
|
||||||
map.put(TYPE_PARAMETER_AS_SUPERTYPE, "Type parameter as supertype")
|
map.put(TYPE_PARAMETER_AS_SUPERTYPE, "Type parameter as supertype")
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ object FirErrors {
|
|||||||
val SYNTAX_ERROR by error0<FirSourceElement, PsiElement>()
|
val SYNTAX_ERROR by error0<FirSourceElement, PsiElement>()
|
||||||
val UNRESOLVED_LABEL by error0<FirSourceElement, PsiElement>()
|
val UNRESOLVED_LABEL by error0<FirSourceElement, PsiElement>()
|
||||||
val ILLEGAL_CONST_EXPRESSION by error0<FirSourceElement, PsiElement>()
|
val ILLEGAL_CONST_EXPRESSION by error0<FirSourceElement, PsiElement>()
|
||||||
|
val ILLEGAL_UNDERSCORE by error0<FirSourceElement, PsiElement>()
|
||||||
val DESERIALIZATION_ERROR by error0<FirSourceElement, PsiElement>()
|
val DESERIALIZATION_ERROR by error0<FirSourceElement, PsiElement>()
|
||||||
val INFERENCE_ERROR by error0<FirSourceElement, PsiElement>()
|
val INFERENCE_ERROR by error0<FirSourceElement, PsiElement>()
|
||||||
val TYPE_PARAMETER_AS_SUPERTYPE by error0<FirSourceElement, PsiElement>()
|
val TYPE_PARAMETER_AS_SUPERTYPE by error0<FirSourceElement, PsiElement>()
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ enum class DiagnosticKind {
|
|||||||
ReturnNotAllowed,
|
ReturnNotAllowed,
|
||||||
UnresolvedLabel,
|
UnresolvedLabel,
|
||||||
IllegalConstExpression,
|
IllegalConstExpression,
|
||||||
|
IllegalUnderscore,
|
||||||
DeserializationError,
|
DeserializationError,
|
||||||
InferenceError,
|
InferenceError,
|
||||||
TypeParameterAsSupertype,
|
TypeParameterAsSupertype,
|
||||||
|
|||||||
Reference in New Issue
Block a user