KT-13628 New line is not preserved when converting java to Kotlin

#KT-13628 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-10-01 00:25:55 +03:00
parent 8fe57c8e84
commit badbcd4989
16 changed files with 91 additions and 23 deletions
+5 -2
View File
@@ -4,8 +4,11 @@ object Test {
@JvmStatic fun main(args: Array<String>) {
println()// Comment
Test.foo()// Comment1
.indexOf("s")// Comment2
Test
// Comment1
.foo()
// Comment2
.indexOf("s")
}
fun foo(): String {
+4 -1
View File
@@ -35,7 +35,10 @@ internal class CustomerBuilder {
object User {
fun main() {
val customer = CustomerBuilder().WithFirstName("Homer").WithLastName("Simpson").Build()
val customer = CustomerBuilder()
.WithFirstName("Homer")
.WithLastName("Simpson")
.Build()
println(customer.firstName)
println(customer.lastName)
}
@@ -0,0 +1,8 @@
public class C {
void foo() {
StringBuilder builder = new StringBuilder();
builder.append(1)
.append(2).append(3)
.append(4);
}
}
+8
View File
@@ -0,0 +1,8 @@
class C {
internal fun foo() {
val builder = StringBuilder()
builder.append(1)
.append(2).append(3)
.append(4)
}
}