K2: support DELEGATION member kind for properties #KT-62581 Fixed
This commit is contained in:
committed by
Space Team
parent
19bf11f041
commit
d42ae35624
+8
-1
@@ -440,7 +440,7 @@ class FirElementSerializer private constructor(
|
||||
hasAnnotations,
|
||||
ProtoEnumFlags.visibility(normalizeVisibility(property)),
|
||||
ProtoEnumFlags.modality(modality),
|
||||
ProtoBuf.MemberKind.DECLARATION,
|
||||
property.memberKind(),
|
||||
property.isVar, hasGetter, hasSetter, hasConstant, property.isConst, property.isLateInit,
|
||||
property.isExternal, property.delegateFieldSymbol != null, property.isExpect
|
||||
)
|
||||
@@ -492,6 +492,13 @@ class FirElementSerializer private constructor(
|
||||
return builder
|
||||
}
|
||||
|
||||
private fun FirProperty.memberKind(): MemberKind {
|
||||
return when (origin) {
|
||||
FirDeclarationOrigin.Delegated -> MemberKind.DELEGATION
|
||||
else -> MemberKind.DECLARATION
|
||||
}
|
||||
}
|
||||
|
||||
fun functionProto(function: FirFunction): ProtoBuf.Function.Builder? = whileAnalysing(session, function) {
|
||||
val builder = ProtoBuf.Function.newBuilder()
|
||||
val simpleFunction = function as? FirSimpleFunction
|
||||
|
||||
Reference in New Issue
Block a user