Replace some FIR syntax errors with more proper diagnostics
This commit is contained in:
+4
-4
@@ -139,8 +139,8 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
|
||||
impl(errorLoop) {
|
||||
default("block", "FirEmptyExpressionBlock()")
|
||||
default("condition", "FirErrorExpressionImpl(source, diagnostic)")
|
||||
useTypes(emptyExpressionBlock)
|
||||
default("condition", "FirErrorExpressionImpl(source, ConeStubDiagnostic(diagnostic))")
|
||||
useTypes(emptyExpressionBlock, coneStubDiagnosticType)
|
||||
}
|
||||
|
||||
impl(expression, "FirExpressionStub") {
|
||||
@@ -390,8 +390,8 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
|
||||
impl(errorExpression) {
|
||||
defaultEmptyList("annotations")
|
||||
default("typeRef", "FirErrorTypeRefImpl(source, diagnostic)")
|
||||
useTypes(errorTypeRefImpl)
|
||||
default("typeRef", "FirErrorTypeRefImpl(source, ConeStubDiagnostic(diagnostic))")
|
||||
useTypes(errorTypeRefImpl, coneStubDiagnosticType)
|
||||
}
|
||||
|
||||
impl(resolvedFunctionTypeRef) {
|
||||
|
||||
@@ -65,6 +65,7 @@ val pureAbstractElementType = generatedType("FirPureAbstractElement")
|
||||
val effectDeclarationType = type("fir.contracts.description", "ConeEffectDeclaration")
|
||||
val emptyContractDescriptionType = generatedType("contracts.impl", "FirEmptyContractDescription")
|
||||
val coneDiagnosticType = generatedType("diagnostics", "ConeDiagnostic")
|
||||
val coneStubDiagnosticType = generatedType("diagnostics", "ConeStubDiagnostic")
|
||||
|
||||
val dslBuilderAnnotationType = generatedType("builder", "FirBuilderDsl")
|
||||
val firImplementationDetailType = generatedType("FirImplementationDetail")
|
||||
Reference in New Issue
Block a user