Files
kotlin-fork/idea/testData/formatter/SpacesAroundOperations.after.kt
T
Nikolay Krasko 6f719a9460 Use binary expression as parent for better spacing (KT-27717)
When BINARY_EXPRESSION is used as parent, spacing rules for it are applied.
There're no rules for OPERATION_REFERENCE on the other side.

 #KT-27717 Fixed
2018-11-01 12:24:02 +03:00

44 lines
782 B
Kotlin
Vendored

class Some {
fun some() {
var int: Int = 0
int = 12
int += 12
int -= 12
int *= 12
int /= 12
int %= 12
true && true
true || false
12 === 3
12 !== 3
12 == 3
12 != 3
12 <= 3
12 >= 3
12 < 3
12 > 3
12 + 3 - 12
12 % 3 * 12 / 3
1 .. 2
null ?: 3 + 1
val a = 1
null ?: a + a
}
}
// SET_TRUE: SPACE_AROUND_ASSIGNMENT_OPERATORS
// SET_TRUE: SPACE_AROUND_LOGICAL_OPERATORS
// SET_TRUE: SPACE_AROUND_EQUALITY_OPERATORS
// SET_TRUE: SPACE_AROUND_RELATIONAL_OPERATORS
// SET_TRUE: SPACE_AROUND_ADDITIVE_OPERATORS
// SET_TRUE: SPACE_AROUND_MULTIPLICATIVE_OPERATORS
// SET_TRUE: SPACE_AROUND_RANGE