FIR: update resolve phase for declaration when visiting with FirContractResolveTransformer
This commit is contained in:
committed by
TeamCityServer
parent
5de4c5fc28
commit
0e98480be3
+9
@@ -79,10 +79,12 @@ open class FirContractResolveTransformer(
|
||||
property.getter?.hasContractToResolve != true && property.setter?.hasContractToResolve != true ||
|
||||
property.isLocal || property.delegate != null
|
||||
) {
|
||||
property.updatePhaseForAccessors()
|
||||
return property
|
||||
}
|
||||
if (property is FirSyntheticProperty) {
|
||||
transformSimpleFunction(property.getter.delegate, data)
|
||||
property.updatePhaseForAccessors()
|
||||
return property
|
||||
}
|
||||
context.withProperty(property) {
|
||||
@@ -92,6 +94,11 @@ open class FirContractResolveTransformer(
|
||||
return property
|
||||
}
|
||||
|
||||
private fun FirProperty.updatePhaseForAccessors() {
|
||||
getter?.updatePhase()
|
||||
setter?.updatePhase()
|
||||
}
|
||||
|
||||
override fun transformField(field: FirField, data: ResolutionMode): FirDeclaration {
|
||||
field.updatePhase()
|
||||
return field
|
||||
@@ -236,6 +243,7 @@ open class FirContractResolveTransformer(
|
||||
anonymousInitializer: FirAnonymousInitializer,
|
||||
data: ResolutionMode
|
||||
): FirDeclaration {
|
||||
anonymousInitializer.updatePhase()
|
||||
return anonymousInitializer
|
||||
}
|
||||
|
||||
@@ -245,6 +253,7 @@ open class FirContractResolveTransformer(
|
||||
}
|
||||
|
||||
override fun transformEnumEntry(enumEntry: FirEnumEntry, data: ResolutionMode): FirDeclaration {
|
||||
enumEntry.updatePhase()
|
||||
return enumEntry
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user