FE10 Analysis API: use compact renderer for flexible types even in debug

This commit is contained in:
Mikhail Glukhikh
2022-06-27 11:28:21 +02:00
committed by Space
parent 38f4a35be2
commit 2b235e1188
4 changed files with 15 additions and 24 deletions
@@ -129,15 +129,6 @@ internal class KtFe10TypeRenderer(private val options: KtTypeRendererOptions, pr
} }
private fun KtFe10RendererConsumer.renderFlexibleType(type: FlexibleType) { private fun KtFe10RendererConsumer.renderFlexibleType(type: FlexibleType) {
if (isDebugText) {
append("ft<")
renderType(type.lowerBound)
append(", ")
renderType(type.upperBound)
append(">")
return
}
val lowerBoundText = prettyPrint { renderType(type.lowerBound) } val lowerBoundText = prettyPrint { renderType(type.lowerBound) }
val upperBoundText = prettyPrint { renderType(type.upperBound) } val upperBoundText = prettyPrint { renderType(type.upperBound) }
append(DescriptorRenderer.COMPACT.renderFlexibleType(lowerBoundText, upperBoundText, type.builtIns)) append(DescriptorRenderer.COMPACT.renderFlexibleType(lowerBoundText, upperBoundText, type.builtIns))
@@ -6,25 +6,25 @@ KtSuccessCallInfo:
extensionReceiver = null extensionReceiver = null
signature = KtFunctionLikeSignature: signature = KtFunctionLikeSignature:
receiverType = null receiverType = null
returnType = java.util.Comparator<ft<kotlin.Int, kotlin.Int?>> returnType = java.util.Comparator<kotlin.Int!>
symbol = java/util/Comparator(function: kotlin.Function2<ft<T, T?>, ft<T, T?>, kotlin.Int>): java.util.Comparator<T> symbol = java/util/Comparator(function: kotlin.Function2<T!, T!, kotlin.Int>): java.util.Comparator<T>
valueParameters = [ valueParameters = [
KtVariableLikeSignature: KtVariableLikeSignature:
name = function name = function
receiverType = null receiverType = null
returnType = kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int> returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
symbol = function: kotlin.Function2<ft<T, T?>, ft<T, T?>, kotlin.Int> symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
callableIdIfNonLocal = null callableIdIfNonLocal = null
] ]
callableIdIfNonLocal = java/util/Comparator callableIdIfNonLocal = java/util/Comparator
typeArgumentsMapping = { typeArgumentsMapping = {
T -> (ft<kotlin.Int, kotlin.Int?>) T -> (kotlin.Int!)
} }
argumentMapping = { argumentMapping = {
{x: Int, y: Int -> 1} -> (KtVariableLikeSignature: {x: Int, y: Int -> 1} -> (KtVariableLikeSignature:
name = function name = function
receiverType = null receiverType = null
returnType = kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int> returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
symbol = function: kotlin.Function2<ft<T, T?>, ft<T, T?>, kotlin.Int> symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
callableIdIfNonLocal = null) callableIdIfNonLocal = null)
} }
@@ -6,26 +6,26 @@ KtApplicableCallCandidateInfo:
extensionReceiver = null extensionReceiver = null
signature = KtFunctionLikeSignature: signature = KtFunctionLikeSignature:
receiverType = null receiverType = null
returnType = java.util.Comparator<ft<kotlin.Int, kotlin.Int?>> returnType = java.util.Comparator<kotlin.Int!>
symbol = java/util/Comparator(function: kotlin.Function2<ft<T, T?>, ft<T, T?>, kotlin.Int>): java.util.Comparator<T> symbol = java/util/Comparator(function: kotlin.Function2<T!, T!, kotlin.Int>): java.util.Comparator<T>
valueParameters = [ valueParameters = [
KtVariableLikeSignature: KtVariableLikeSignature:
name = function name = function
receiverType = null receiverType = null
returnType = kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int> returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
symbol = function: kotlin.Function2<ft<T, T?>, ft<T, T?>, kotlin.Int> symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
callableIdIfNonLocal = null callableIdIfNonLocal = null
] ]
callableIdIfNonLocal = java/util/Comparator callableIdIfNonLocal = java/util/Comparator
typeArgumentsMapping = { typeArgumentsMapping = {
T -> (ft<kotlin.Int, kotlin.Int?>) T -> (kotlin.Int!)
} }
argumentMapping = { argumentMapping = {
{x: Int, y: Int -> 1} -> (KtVariableLikeSignature: {x: Int, y: Int -> 1} -> (KtVariableLikeSignature:
name = function name = function
receiverType = null receiverType = null
returnType = kotlin.Function2<ft<kotlin.Int, kotlin.Int?>, ft<kotlin.Int, kotlin.Int?>, kotlin.Int> returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
symbol = function: kotlin.Function2<ft<T, T?>, ft<T, T?>, kotlin.Int> symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
callableIdIfNonLocal = null) callableIdIfNonLocal = null)
} }
isInBestCandidates = true isInBestCandidates = true
@@ -14,7 +14,7 @@ KtNamedClassOrObjectSymbol:
superTypes: [ superTypes: [
kotlin/Any kotlin/Any
java/io/Serializable java/io/Serializable
kotlin/Comparable<ft<kotlin/String, kotlin/String?>> kotlin/Comparable<kotlin/String!>
kotlin/CharSequence kotlin/CharSequence
] ]
symbolKind: TOP_LEVEL symbolKind: TOP_LEVEL