FIR: add pointer from primary constructor param to correspondng property
This commit is contained in:
committed by
Roman Golyshev
parent
112f365414
commit
9b3add0130
@@ -123,3 +123,10 @@ private object MatchingParameterFunctionTypeKey : FirDeclarationDataKey()
|
||||
*/
|
||||
var <D : FirAnonymousFunction>
|
||||
D.matchingParameterFunctionType: ConeKotlinType? by FirDeclarationDataRegistry.data(MatchingParameterFunctionTypeKey)
|
||||
|
||||
private object CorrespondingProperty : FirDeclarationDataKey()
|
||||
|
||||
/**
|
||||
* The corresponding [FirProperty] if the current value parameter is a `val` or `var` declared inside the primary constructor.
|
||||
*/
|
||||
var FirValueParameter.correspondingProperty: FirProperty? by FirDeclarationDataRegistry.data(CorrespondingProperty)
|
||||
@@ -437,6 +437,7 @@ open class FirRenderer(builder: StringBuilder, protected val mode: RenderMode =
|
||||
private fun Any.renderAsDeclarationAttributeValue() = when (this) {
|
||||
is FirCallableSymbol<*> -> callableId.toString()
|
||||
is FirClassLikeSymbol<*> -> classId.asString()
|
||||
is FirProperty -> symbol.callableId.toString()
|
||||
else -> toString()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user