[FIR] set correct resolve phase for default getter, setter and backing field
^KT-58163 Fixed
This commit is contained in:
committed by
Space Team
parent
1703d3a47e
commit
866e8a26c7
+12
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -39,10 +39,11 @@ abstract class FirDefaultPropertyAccessor(
|
||||
visibility: Visibility,
|
||||
modality: Modality = Modality.FINAL,
|
||||
effectiveVisibility: EffectiveVisibility? = null,
|
||||
symbol: FirPropertyAccessorSymbol
|
||||
symbol: FirPropertyAccessorSymbol,
|
||||
resolvePhase: FirResolvePhase,
|
||||
) : FirPropertyAccessorImpl(
|
||||
source,
|
||||
resolvePhase = FirResolvePhase.RAW_FIR,
|
||||
resolvePhase,
|
||||
moduleData,
|
||||
origin,
|
||||
FirDeclarationAttributes(),
|
||||
@@ -103,7 +104,8 @@ class FirDefaultPropertyGetter(
|
||||
propertySymbol: FirPropertySymbol,
|
||||
modality: Modality = Modality.FINAL,
|
||||
effectiveVisibility: EffectiveVisibility? = null,
|
||||
symbol: FirPropertyAccessorSymbol = FirPropertyAccessorSymbol()
|
||||
symbol: FirPropertyAccessorSymbol = FirPropertyAccessorSymbol(),
|
||||
resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR,
|
||||
) : FirDefaultPropertyAccessor(
|
||||
source,
|
||||
moduleData,
|
||||
@@ -115,7 +117,8 @@ class FirDefaultPropertyGetter(
|
||||
visibility = visibility,
|
||||
modality = modality,
|
||||
effectiveVisibility = effectiveVisibility,
|
||||
symbol = symbol
|
||||
symbol = symbol,
|
||||
resolvePhase = resolvePhase,
|
||||
)
|
||||
|
||||
class FirDefaultPropertySetter(
|
||||
@@ -129,6 +132,7 @@ class FirDefaultPropertySetter(
|
||||
effectiveVisibility: EffectiveVisibility? = null,
|
||||
propertyAccessorSymbol: FirPropertyAccessorSymbol = FirPropertyAccessorSymbol(),
|
||||
parameterAnnotations: List<FirAnnotation> = emptyList(),
|
||||
resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR,
|
||||
) : FirDefaultPropertyAccessor(
|
||||
source,
|
||||
moduleData,
|
||||
@@ -136,6 +140,7 @@ class FirDefaultPropertySetter(
|
||||
FirImplicitUnitTypeRef(source),
|
||||
valueParameters = mutableListOf(
|
||||
buildDefaultSetterValueParameter builder@{
|
||||
this@builder.resolvePhase = resolvePhase
|
||||
this@builder.source = source?.fakeElement(KtFakeSourceElementKind.DefaultAccessor)
|
||||
this@builder.containingFunctionSymbol = propertyAccessorSymbol
|
||||
this@builder.moduleData = moduleData
|
||||
@@ -150,5 +155,6 @@ class FirDefaultPropertySetter(
|
||||
visibility = visibility,
|
||||
modality = modality,
|
||||
effectiveVisibility = effectiveVisibility,
|
||||
symbol = propertyAccessorSymbol
|
||||
symbol = propertyAccessorSymbol,
|
||||
resolvePhase = resolvePhase,
|
||||
)
|
||||
|
||||
+3
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -25,10 +25,11 @@ class FirDefaultPropertyBackingField(
|
||||
isVar: Boolean,
|
||||
propertySymbol: FirPropertySymbol,
|
||||
status: FirDeclarationStatus,
|
||||
resolvePhase: FirResolvePhase = FirResolvePhase.RAW_FIR,
|
||||
) : FirBackingFieldImpl(
|
||||
source = null,
|
||||
moduleData = moduleData,
|
||||
resolvePhase = FirResolvePhase.RAW_FIR,
|
||||
resolvePhase = resolvePhase,
|
||||
origin = FirDeclarationOrigin.Synthetic,
|
||||
attributes = FirDeclarationAttributes(),
|
||||
returnTypeRef = returnTypeRef,
|
||||
|
||||
Reference in New Issue
Block a user