Fix spaces in labeled expression (KT-14131)

https://github.com/JetBrains/kotlin/pull/978

(cherry picked from commit fdd5ba7)
This commit is contained in:
Dmitry Neverov
2016-10-17 22:49:06 +03:00
committed by Nikolay Krasko
parent bdecb661e3
commit 3cc3ad2b9e
5 changed files with 90 additions and 1 deletions
+40
View File
@@ -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
{
}
}