Fix spaces in labeled expression (KT-14131)
https://github.com/JetBrains/kotlin/pull/978 (cherry picked from commit fdd5ba7)
This commit is contained in:
committed by
Nikolay Krasko
parent
bdecb661e3
commit
3cc3ad2b9e
@@ -0,0 +1,40 @@
|
||||
fun test1() {
|
||||
loop@ while (true) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
listOf(1).forEach lit@ {
|
||||
if (it == 0) return@lit
|
||||
print(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
l1@
|
||||
|
||||
|
||||
/*comment*/ {
|
||||
|
||||
}
|
||||
|
||||
l2@ /*comment*/ {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
l1@
|
||||
|
||||
|
||||
//eol comment
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
l2@ //eol comment
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
fun test1() {
|
||||
loop@ while(true) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
listOf(1).forEach lit@ {
|
||||
if (it == 0) return@lit
|
||||
print(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
l1@
|
||||
|
||||
|
||||
/*comment*/ {
|
||||
|
||||
}
|
||||
|
||||
l2@ /*comment*/ {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
l1@
|
||||
|
||||
|
||||
//eol comment
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
l2@ //eol comment
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user