New J2K: print new line before init section because of bad formatting
This commit is contained in:
@@ -342,6 +342,7 @@ class NewCodeBuilder(context: NewJ2kConverterContext) {
|
||||
|
||||
override fun visitKtInitDeclarationRaw(ktInitDeclaration: JKKtInitDeclaration) {
|
||||
if (ktInitDeclaration.block.statements.isNotEmpty()) {
|
||||
printer.println()
|
||||
printer.print("init ")
|
||||
ktInitDeclaration.block.accept(this)
|
||||
}
|
||||
|
||||
@@ -16,10 +16,10 @@ internal class A @JvmOverloads constructor(p: Int = 1) {
|
||||
// end of secondary constructor 1 body
|
||||
}
|
||||
|
||||
internal class B // this constructor will disappear
|
||||
// end of constructor body
|
||||
internal class B // end of constructor body
|
||||
(private val x: Int) {
|
||||
fun foo() {}
|
||||
// this constructor will disappear
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user