[FIR] Render attributes on function types.
Only render if there are non-compiler attributes to reduce noise from extension function types.
This commit is contained in:
@@ -25,6 +25,8 @@ open class ConeTypeRenderer {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type.renderNonCompilerAttributes()
|
||||||
|
|
||||||
if (type.isMarkedNullable) {
|
if (type.isMarkedNullable) {
|
||||||
builder.append("(")
|
builder.append("(")
|
||||||
}
|
}
|
||||||
@@ -180,6 +182,13 @@ open class ConeTypeRenderer {
|
|||||||
builder.append(attributeRenderer.render(attributes))
|
builder.append(attributeRenderer.render(attributes))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun ConeKotlinType.renderNonCompilerAttributes() {
|
||||||
|
val compilerAttributes = CompilerConeAttributes.classIdByCompilerAttributeKey
|
||||||
|
if (attributes.any { it.key !in compilerAttributes }) {
|
||||||
|
builder.append(attributeRenderer.render(attributes))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun ConeTypeProjection.render() {
|
private fun ConeTypeProjection.render() {
|
||||||
when (this) {
|
when (this) {
|
||||||
ConeStarProjection -> {
|
ConeStarProjection -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user