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) {
|
override fun visitKtInitDeclarationRaw(ktInitDeclaration: JKKtInitDeclaration) {
|
||||||
if (ktInitDeclaration.block.statements.isNotEmpty()) {
|
if (ktInitDeclaration.block.statements.isNotEmpty()) {
|
||||||
|
printer.println()
|
||||||
printer.print("init ")
|
printer.print("init ")
|
||||||
ktInitDeclaration.block.accept(this)
|
ktInitDeclaration.block.accept(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ internal class A @JvmOverloads constructor(p: Int = 1) {
|
|||||||
// end of secondary constructor 1 body
|
// end of secondary constructor 1 body
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class B // this constructor will disappear
|
internal class B // end of constructor body
|
||||||
// end of constructor body
|
|
||||||
(private val x: Int) {
|
(private val x: Int) {
|
||||||
fun foo() {}
|
fun foo() {}
|
||||||
|
// this constructor will disappear
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user