[FIR] Fix duplicate spaces in FirPartialModifierRenderer
This commit is contained in:
committed by
Space Team
parent
7abeb05c8d
commit
6a073e0b17
+6
-6
@@ -15,28 +15,28 @@ class FirPartialModifierRenderer : FirModifierRenderer() {
|
||||
renderModifier("expect")
|
||||
}
|
||||
if (memberDeclaration.isActual) {
|
||||
renderModifier("actual ")
|
||||
renderModifier("actual")
|
||||
}
|
||||
if (memberDeclaration.isStatic) {
|
||||
renderModifier("static ")
|
||||
renderModifier("static")
|
||||
}
|
||||
if (memberDeclaration.isInner) {
|
||||
renderModifier("inner ")
|
||||
renderModifier("inner")
|
||||
}
|
||||
// `companion/data/fun` modifiers are only valid for FirRegularClass, but we render them to make sure they are not
|
||||
// incorrectly loaded for other declarations during deserialization.
|
||||
if (memberDeclaration.status.isCompanion) {
|
||||
renderModifier("companion ")
|
||||
renderModifier("companion")
|
||||
}
|
||||
if (memberDeclaration.status.isData) {
|
||||
renderModifier("data ")
|
||||
renderModifier("data")
|
||||
}
|
||||
// All Java interfaces are considered `fun` (functional interfaces) for resolution purposes
|
||||
// (see JavaSymbolProvider.createFirJavaClass). Don't render `fun` for Java interfaces; it's not a modifier in Java.
|
||||
val isJavaInterface =
|
||||
memberDeclaration is FirRegularClass && memberDeclaration.classKind == ClassKind.INTERFACE && memberDeclaration.isJava
|
||||
if (memberDeclaration.status.isFun && !isJavaInterface) {
|
||||
renderModifier("fun ")
|
||||
renderModifier("fun")
|
||||
}
|
||||
if (memberDeclaration.isSuspend) {
|
||||
renderModifier("suspend")
|
||||
|
||||
Reference in New Issue
Block a user