[FIR] add missed diagnostics for incomplete code

^KT-55053
This commit is contained in:
Anna Kozlova
2023-01-27 12:10:09 +01:00
committed by Space Team
parent 706a8a91f6
commit e54627b309
5 changed files with 25 additions and 1 deletions
@@ -1814,7 +1814,9 @@ open class RawFirBuilder(
buildOrLazyExpression(expression.toFirSourceElement()) {
expression.toFirExpression("Should have delegate")
}
} ?: buildErrorExpression { ConeSimpleDiagnostic("Should have delegate", DiagnosticKind.ExpressionExpected) }
} ?: buildErrorExpression {
diagnostic = ConeSimpleDiagnostic("Should have delegate", DiagnosticKind.ExpressionExpected)
}
val delegateBuilder = FirWrappedDelegateExpressionBuilder().apply {
val delegateExpression = extractDelegateExpression()