[AA] DebugSymbolRenderer: improve context receivers render
^KT-56046
This commit is contained in:
committed by
Space Team
parent
1e2d517c21
commit
3b99a5bf34
+10
-8
@@ -281,7 +281,7 @@ public class DebugSymbolRenderer(
|
||||
.renderKtContractEffectDeclaration(value, endWithNewLine = false)
|
||||
is KtNamedAnnotationValue -> renderNamedConstantValue(value)
|
||||
is KtInitializerValue -> renderKtInitializerValue(value)
|
||||
is KtContextReceiver -> rendeContextReceiver(value)
|
||||
is KtContextReceiver -> renderContextReceiver(value)
|
||||
is KtAnnotationApplication -> renderAnnotationApplication(value)
|
||||
is KtAnnotationsList -> renderAnnotationsList(value)
|
||||
is KtModule -> renderKtModule(value)
|
||||
@@ -325,14 +325,16 @@ public class DebugSymbolRenderer(
|
||||
}
|
||||
|
||||
context(KtAnalysisSession)
|
||||
private fun PrettyPrinter.rendeContextReceiver(receiver: KtContextReceiver) {
|
||||
append("ContextReceiver(")
|
||||
receiver.label?.let { label ->
|
||||
renderValue(label, renderSymbolsFully = false)
|
||||
append("@")
|
||||
private fun PrettyPrinter.renderContextReceiver(receiver: KtContextReceiver) {
|
||||
append("KtContextReceiver:")
|
||||
withIndent {
|
||||
appendLine()
|
||||
append("label: ")
|
||||
renderValue(receiver.label, renderSymbolsFully = false)
|
||||
appendLine()
|
||||
append("type: ")
|
||||
renderType(receiver.type)
|
||||
}
|
||||
renderType(receiver.type)
|
||||
append(")")
|
||||
}
|
||||
|
||||
context(KtAnalysisSession)
|
||||
|
||||
Vendored
+12
-8
@@ -48,14 +48,18 @@ KtNamedClassOrObjectSymbol:
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: kotlin/Int
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
ContextReceiver(s@KtUsualClassType:
|
||||
type: kotlin/String
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: kotlin/Int
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
KtContextReceiver:
|
||||
label: s
|
||||
type: KtUsualClassType:
|
||||
type: kotlin/String
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
isData: false
|
||||
isExternal: false
|
||||
|
||||
Vendored
+12
-8
@@ -2,14 +2,18 @@ KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /y
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: kotlin/Int
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
ContextReceiver(s@KtUsualClassType:
|
||||
type: kotlin/String
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: kotlin/Int
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
KtContextReceiver:
|
||||
label: s
|
||||
type: KtUsualClassType:
|
||||
type: kotlin/String
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
|
||||
Vendored
+12
-8
@@ -2,14 +2,18 @@ KtKotlinPropertySymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /y
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: kotlin/Int
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
ContextReceiver(s@KtUsualClassType:
|
||||
type: kotlin/String
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: kotlin/Int
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
KtContextReceiver:
|
||||
label: s
|
||||
type: KtUsualClassType:
|
||||
type: kotlin/String
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
getter: KtPropertyGetterSymbol:
|
||||
annotationsList: []
|
||||
|
||||
+36
-24
@@ -56,10 +56,12 @@ KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /tooo
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: A
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: A
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
@@ -91,10 +93,12 @@ KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /tooo
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: B
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: B
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
@@ -126,14 +130,18 @@ KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /tooo
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: A
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: B
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: A
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: B
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
@@ -165,14 +173,18 @@ KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: /tooo
|
||||
contextReceivers: [
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: B
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
ContextReceiver(KtUsualClassType:
|
||||
type: A
|
||||
annotationsList: []
|
||||
ownTypeArguments: [])
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: B
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
KtContextReceiver:
|
||||
label: null
|
||||
type: KtUsualClassType:
|
||||
type: A
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
]
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
|
||||
Reference in New Issue
Block a user