Change annotations parsing in bodies of operators
This change only matters in cases of if/when/for/while having braceless blocks Annotations on them are parsed now as on block-level expressions, i.e. they're attached to the whole expression
This commit is contained in:
@@ -14,10 +14,35 @@ fun foo() {
|
||||
}
|
||||
|
||||
for (i in 1..100)
|
||||
// annotation is attached to `x4`
|
||||
@ann4
|
||||
x4 += foo4()
|
||||
|
||||
if (1 > 2)
|
||||
@ann41
|
||||
x41 += foo41()
|
||||
|
||||
if (3 > 4)
|
||||
@ann42
|
||||
x42 += foo42()
|
||||
else
|
||||
@ann43
|
||||
x43 += foo43()
|
||||
|
||||
while (true)
|
||||
@ann44
|
||||
x44 += foo44()
|
||||
|
||||
do
|
||||
@ann
|
||||
x45 += foo45()
|
||||
while (true)
|
||||
|
||||
when (1) {
|
||||
1 ->
|
||||
@ann46
|
||||
x46 += foo46()
|
||||
}
|
||||
|
||||
a.filter {
|
||||
@ann5
|
||||
x5 += foo5()
|
||||
|
||||
Reference in New Issue
Block a user