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.getter?.hasContractToResolve != true && property.setter?.hasContractToResolve != true ||
|
||||||
property.isLocal || property.delegate != null
|
property.isLocal || property.delegate != null
|
||||||
) {
|
) {
|
||||||
|
property.updatePhaseForAccessors()
|
||||||
return property
|
return property
|
||||||
}
|
}
|
||||||
if (property is FirSyntheticProperty) {
|
if (property is FirSyntheticProperty) {
|
||||||
transformSimpleFunction(property.getter.delegate, data)
|
transformSimpleFunction(property.getter.delegate, data)
|
||||||
|
property.updatePhaseForAccessors()
|
||||||
return property
|
return property
|
||||||
}
|
}
|
||||||
context.withProperty(property) {
|
context.withProperty(property) {
|
||||||
@@ -92,6 +94,11 @@ open class FirContractResolveTransformer(
|
|||||||
return property
|
return property
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun FirProperty.updatePhaseForAccessors() {
|
||||||
|
getter?.updatePhase()
|
||||||
|
setter?.updatePhase()
|
||||||
|
}
|
||||||
|
|
||||||
override fun transformField(field: FirField, data: ResolutionMode): FirDeclaration {
|
override fun transformField(field: FirField, data: ResolutionMode): FirDeclaration {
|
||||||
field.updatePhase()
|
field.updatePhase()
|
||||||
return field
|
return field
|
||||||
@@ -236,6 +243,7 @@ open class FirContractResolveTransformer(
|
|||||||
anonymousInitializer: FirAnonymousInitializer,
|
anonymousInitializer: FirAnonymousInitializer,
|
||||||
data: ResolutionMode
|
data: ResolutionMode
|
||||||
): FirDeclaration {
|
): FirDeclaration {
|
||||||
|
anonymousInitializer.updatePhase()
|
||||||
return anonymousInitializer
|
return anonymousInitializer
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,6 +253,7 @@ open class FirContractResolveTransformer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun transformEnumEntry(enumEntry: FirEnumEntry, data: ResolutionMode): FirDeclaration {
|
override fun transformEnumEntry(enumEntry: FirEnumEntry, data: ResolutionMode): FirDeclaration {
|
||||||
|
enumEntry.updatePhase()
|
||||||
return enumEntry
|
return enumEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user