[FIR] Fix dumpKotlinLike

This commit is contained in:
Nikolay Lunyak
2021-08-20 01:36:48 +03:00
committed by TeamCityServer
parent 79ceaf03bf
commit e571de5942
@@ -617,9 +617,11 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
returnType.printTypeWithNoIndent() returnType.printTypeWithNoIndent()
} }
printWhereClauseIfNeededWithNoIndent() printWhereClauseIfNeededWithNoIndent()
p.printWithNoIndent(" ")
body?.accept(this@KotlinLikeDumper, null) body?.let {
p.printWithNoIndent(" ")
it.accept(this@KotlinLikeDumper, null)
}
} else { } else {
p.printlnWithNoIndent() p.printlnWithNoIndent()
} }
@@ -724,9 +726,16 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
p.printWithNoIndent(declaration.name.asString()) p.printWithNoIndent(declaration.name.asString())
declaration.getter?.returnType?.let { val backingField = declaration.backingField
if (backingField != null && !declaration.isDelegated) {
p.printWithNoIndent(": ") p.printWithNoIndent(": ")
it.printTypeWithNoIndent() backingField.type.printTypeWithNoIndent()
} else {
declaration.getter?.returnType?.let {
p.printWithNoIndent(": ")
it.printTypeWithNoIndent()
}
} }
/* TODO better rendering for /* TODO better rendering for