[FIR] Add transformAnnotationTypeRef to FirAnnotationCall

This commit is contained in:
Dmitriy Novozhilov
2020-04-28 13:12:25 +03:00
parent ab2177f8a4
commit f9c37cfa6c
3 changed files with 9 additions and 2 deletions
@@ -33,4 +33,6 @@ abstract class FirAnnotationCall : FirExpression(), FirCall {
abstract fun replaceResolved(newResolved: Boolean)
abstract override fun <D> transformAnnotations(transformer: FirTransformer<D>, data: D): FirAnnotationCall
abstract fun <D> transformAnnotationTypeRef(transformer: FirTransformer<D>, data: D): FirAnnotationCall
}
@@ -36,7 +36,7 @@ internal class FirAnnotationCallImpl(
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirAnnotationCallImpl {
transformAnnotations(transformer, data)
argumentList = argumentList.transformSingle(transformer, data)
annotationTypeRef = annotationTypeRef.transformSingle(transformer, data)
transformAnnotationTypeRef(transformer, data)
return this
}
@@ -45,6 +45,11 @@ internal class FirAnnotationCallImpl(
return this
}
override fun <D> transformAnnotationTypeRef(transformer: FirTransformer<D>, data: D): FirAnnotationCallImpl {
annotationTypeRef = annotationTypeRef.transformSingle(transformer, data)
return this
}
override fun replaceTypeRef(newTypeRef: FirTypeRef) {}
override fun replaceArgumentList(newArgumentList: FirArgumentList) {
@@ -415,7 +415,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
annotationCall.configure {
+field("useSiteTarget", annotationUseSiteTargetType, nullable = true)
+field("annotationTypeRef", typeRef)
+field("annotationTypeRef", typeRef).withTransform()
+booleanField("resolved", withReplace = true)
}