Fix comment placement on if/else in if or when condition #KT-28224 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
520679a2b4
commit
ff4279762e
@@ -0,0 +1,5 @@
|
||||
fun test(x: Int, b: Boolean) {
|
||||
val foo = if (x == 1)
|
||||
if (b) 1 else<caret> 2 // comment
|
||||
else 0
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(x: Int, b: Boolean) {
|
||||
val foo = if (x == 1)
|
||||
if (b) 1 else {
|
||||
2 // comment
|
||||
}
|
||||
else 0
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
fun test(x: Int, b: Boolean) {
|
||||
val bar = when (x) {
|
||||
1 ->
|
||||
if (b) 1 else<caret> 2 // comment
|
||||
else ->
|
||||
0
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fun test(x: Int, b: Boolean) {
|
||||
val bar = when (x) {
|
||||
1 ->
|
||||
if (b) 1 else {
|
||||
2 // comment
|
||||
}
|
||||
else ->
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user