[FIR] DeprecationsProvider: make evaluation of deprecations on demand
This commit is contained in:
committed by
teamcity
parent
98ebad2d75
commit
25fc948d95
+7
@@ -423,6 +423,13 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
||||
) {
|
||||
default(it, "${declarationAttributesType.type}()")
|
||||
}
|
||||
|
||||
configureFieldInAllLeafBuilders(
|
||||
field = "deprecationsProvider"
|
||||
) {
|
||||
default(it, "UnresolvedDeprecationProvider")
|
||||
useTypes(unresolvedDeprecationsProviderType)
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun findImplementationsWithElementInParents(
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
callableDeclaration.configure {
|
||||
+field("returnTypeRef", typeRef, withReplace = true).withTransform()
|
||||
+field("receiverTypeRef", typeRef, nullable = true, withReplace = true).withTransform()
|
||||
+field("deprecation", deprecationsPerUseSiteType, nullable = true).withReplace().apply { isMutable = true }
|
||||
+field("deprecationsProvider", deprecationsProviderType).withReplace().apply { isMutable = true }
|
||||
+symbol("FirCallableSymbol", "out FirCallableDeclaration")
|
||||
|
||||
+field("containerSource", type(DeserializedContainerSource::class), nullable = true)
|
||||
@@ -245,7 +245,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
|
||||
classLikeDeclaration.configure {
|
||||
+symbol("FirClassLikeSymbol", "out FirClassLikeDeclaration")
|
||||
+field("deprecation", deprecationsPerUseSiteType, nullable = true).withReplace().apply { isMutable = true}
|
||||
+field("deprecationsProvider", deprecationsProviderType).withReplace().apply { isMutable = true}
|
||||
}
|
||||
|
||||
klass.configure {
|
||||
|
||||
+2
-1
@@ -94,7 +94,8 @@ val functionCallOrigin = type("fir.expressions", "FirFunctionCallOrigin")
|
||||
|
||||
val resolvedDeclarationStatusImplType = type("fir.declarations.impl", "FirResolvedDeclarationStatusImpl")
|
||||
|
||||
val deprecationsPerUseSiteType = type("fir.declarations", "DeprecationsPerUseSite")
|
||||
val deprecationsProviderType = type("fir.declarations", "DeprecationsProvider")
|
||||
val unresolvedDeprecationsProviderType = type("fir.declarations", "UnresolvedDeprecationProvider")
|
||||
val emptyAnnotationArgumentMappingType = type("fir.expressions.impl", "FirEmptyAnnotationArgumentMapping")
|
||||
|
||||
val firPropertySymbolType = type("fir.symbols.impl", "FirPropertySymbol")
|
||||
|
||||
Reference in New Issue
Block a user