[FIR] KT-46483: Forbid annotations in where Clauses
Merge-request: KT-MR-7208 Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru>
This commit is contained in:
+8
@@ -122,6 +122,14 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
||||
useTypes(emptyArgumentListType, emptyAnnotationArgumentMappingType, implicitTypeRefType)
|
||||
}
|
||||
|
||||
builder(errorAnnotationCall) {
|
||||
parents += callBuilder
|
||||
default("argumentList", "FirEmptyArgumentList")
|
||||
default("argumentMapping", "FirEmptyAnnotationArgumentMapping")
|
||||
default("annotationTypeRef", "FirImplicitTypeRefImpl(null)")
|
||||
useTypes(emptyArgumentListType, emptyAnnotationArgumentMappingType, implicitTypeRefType)
|
||||
}
|
||||
|
||||
builder(arrayOfCall) {
|
||||
parents += callBuilder
|
||||
}
|
||||
|
||||
+1
@@ -94,6 +94,7 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
val annotation by element(Expression, expression)
|
||||
val annotationCall by element(Expression, annotation, call, resolvable)
|
||||
val annotationArgumentMapping by element(Expression)
|
||||
val errorAnnotationCall by element(Expression, annotationCall, diagnosticHolder)
|
||||
val comparisonExpression by element(Expression, expression)
|
||||
val typeOperatorCall by element(Expression, expression, call)
|
||||
val assignmentOperatorStatement by element(Expression, statement)
|
||||
|
||||
+7
@@ -96,6 +96,13 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
}
|
||||
}
|
||||
|
||||
impl(errorAnnotationCall) {
|
||||
commonAnnotationConfig()
|
||||
default("argumentMapping") {
|
||||
needAcceptAndTransform = false
|
||||
}
|
||||
}
|
||||
|
||||
impl(arrayOfCall)
|
||||
|
||||
impl(callableReferenceAccess)
|
||||
|
||||
+4
@@ -469,6 +469,10 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
+field("argumentMapping", annotationArgumentMapping, withReplace = true)
|
||||
}
|
||||
|
||||
errorAnnotationCall.configure {
|
||||
+field("argumentMapping", annotationArgumentMapping, withReplace = true)
|
||||
}
|
||||
|
||||
annotationArgumentMapping.configure {
|
||||
+field("mapping", type("Map") to listOf(nameType, expression))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user