[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
|
||||
}
|
||||
|
||||
type.renderNonCompilerAttributes()
|
||||
|
||||
if (type.isMarkedNullable) {
|
||||
builder.append("(")
|
||||
}
|
||||
@@ -180,6 +182,13 @@ open class ConeTypeRenderer {
|
||||
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() {
|
||||
when (this) {
|
||||
ConeStarProjection -> {
|
||||
|
||||
Reference in New Issue
Block a user