J2K: do not drop formatting for expressions with operator
This commit is contained in:
@@ -2,6 +2,7 @@ internal enum class Color : Runnable {
|
||||
WHITE, BLACK, RED, YELLOW, BLUE;
|
||||
|
||||
override fun run() {
|
||||
println("name()=" + name + ", toString()=" + toString())
|
||||
println("name()=" + name +
|
||||
", toString()=" + toString())
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
//file
|
||||
import kotlinApi.*;
|
||||
|
||||
//TODO: Formatter works incorrectly
|
||||
class A {
|
||||
int foo(KotlinClass c) {
|
||||
return c.getNullableProperty().length()
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
import kotlinApi.*
|
||||
|
||||
//TODO: Formatter works incorrectly
|
||||
internal class A {
|
||||
fun foo(c: KotlinClass): Int {
|
||||
return c.nullableProperty!!.length + c.property.length + KotlinClass.nullableStaticVar!! + KotlinClass.staticVar + KotlinClass.nullableStaticFun(1)!! + KotlinClass.staticFun(1) + nullableGlobalFunction("")!!.length + globalFunction("").length
|
||||
return c.nullableProperty!!.length
|
||||
+c.property.length
|
||||
+KotlinClass.nullableStaticVar!!
|
||||
+KotlinClass.staticVar
|
||||
+KotlinClass.nullableStaticFun(1)!!
|
||||
+KotlinClass.staticFun(1)
|
||||
+nullableGlobalFunction("")!!.length
|
||||
+globalFunction("").length
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ internal class C {
|
||||
fun foo(): Int {
|
||||
KotlinObject.property1 = 1
|
||||
KotlinObject.property2 = 2
|
||||
return KotlinObject.foo() + KotlinObject.property1 + KotlinObject.property2
|
||||
return KotlinObject.foo() +
|
||||
KotlinObject.property1 +
|
||||
KotlinObject.property2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class A {
|
||||
public static final String TEXT1 = "text1.\n" +
|
||||
"text2\n" +
|
||||
"text3";
|
||||
|
||||
|
||||
public static final String TEXT2 = "text1\n"
|
||||
+ "text2\n"
|
||||
+ "text3";
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
object A {
|
||||
val TEXT1 = "text1.\n" +
|
||||
"text2\n" +
|
||||
"text3"
|
||||
|
||||
|
||||
val TEXT2 = "text1\n"
|
||||
+ "text2\n"
|
||||
+ "text3"
|
||||
}
|
||||
Reference in New Issue
Block a user