[FIR] Add opt-in to replaceIsTrailingLambda
#KT-66553
This commit is contained in:
committed by
Space Team
parent
1876c8a9ee
commit
b74dcb77e3
+3
-1
@@ -332,7 +332,9 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
|
||||
anonymousFunctionExpression.configure {
|
||||
+field(anonymousFunction).withTransform()
|
||||
+booleanField("isTrailingLambda", withReplace = true)
|
||||
+booleanField("isTrailingLambda", withReplace = true).apply {
|
||||
replaceOptInAnnotation = rawFirApi
|
||||
}
|
||||
}
|
||||
|
||||
typeParameter.configure {
|
||||
|
||||
@@ -124,4 +124,5 @@ val firTransformerType = generatedType("visitors", "FirTransformer")
|
||||
|
||||
val resolveStateAccessAnnotation = type("fir.declarations", "ResolveStateAccess", kind = TypeKind.Class)
|
||||
val unresolvedExpressionTypeAccessAnnotation = type("fir.expressions", "UnresolvedExpressionTypeAccess", kind = TypeKind.Class)
|
||||
val rawFirApi = type("fir.expressions", "RawFirApi", kind = TypeKind.Class)
|
||||
val firBuilderDslAnnotation = type("fir.builder", "FirBuilderDsl", kind = TypeKind.Class)
|
||||
|
||||
+4
@@ -103,6 +103,10 @@ class FieldWithDefault(override val origin: Field) : Field(), AbstractFieldWithD
|
||||
get() = origin.optInAnnotation
|
||||
set(_) {}
|
||||
|
||||
override var replaceOptInAnnotation: ClassRef<*>?
|
||||
get() = origin.replaceOptInAnnotation
|
||||
set(_) {}
|
||||
|
||||
override var defaultValueInImplementation: String? = origin.defaultValueInImplementation
|
||||
override var defaultValueInBuilder: String? = null
|
||||
override var isMutable: Boolean = origin.isMutable
|
||||
|
||||
+1
@@ -78,6 +78,7 @@ fun SmartPrinter.replaceFunctionDeclaration(
|
||||
implementationKind == ImplementationKind.AbstractClass || implementationKind == ImplementationKind.SealedClass
|
||||
},
|
||||
override = override,
|
||||
optInAnnotation = field.replaceOptInAnnotation,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user