J2K: parenthesize receiver if needed
#KT-10121 Fixed
This commit is contained in:
@@ -1 +1 @@
|
||||
assert((boolMethod()))
|
||||
assert(boolMethod())
|
||||
@@ -0,0 +1,7 @@
|
||||
//method
|
||||
public static void adjust(String name, int maxLen) {
|
||||
String.format("%-" + maxLen + "s", name);
|
||||
String.valueOf(1 + 1);
|
||||
"a".split("\\s+" + "\\s+", 2)
|
||||
kotlinApi.KotlinApiKt.extensionFunction(1 + 1)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun adjust(name: String, maxLen: Int) {
|
||||
("%-" + maxLen + "s").format(name)
|
||||
(1 + 1).toString()
|
||||
"a".split(("\\s+" + "\\s+").toRegex(), 2).toTypedArray()
|
||||
(1 + 1).extensionFunction()
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !specifyLocalVariableTypeByDefault: true
|
||||
fun foo(b: Boolean) {
|
||||
val s: String? = (if (b) "abc" else null)
|
||||
val s: String? = if (b) "abc" else null
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
//expression
|
||||
(1 + 2)
|
||||
(1 + 2).foo()
|
||||
@@ -1 +1 @@
|
||||
(1 + 2)
|
||||
(1 + 2).foo()
|
||||
@@ -1,2 +1,2 @@
|
||||
//expression
|
||||
(str.toString() + "abc")
|
||||
(str.toString() + "abc").foo()
|
||||
@@ -1 +1 @@
|
||||
(str.toString() + "abc")
|
||||
(str.toString() + "abc").foo()
|
||||
Reference in New Issue
Block a user