Adjust testData to new labels syntax
This commit is contained in:
+3
-3
@@ -1,13 +1,13 @@
|
||||
fun test() {
|
||||
|
||||
@l for (i in if (true) 1..10 else <!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue@l<!>) {}
|
||||
l@ for (i in if (true) 1..10 else <!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue@l<!>) {}
|
||||
for (i in if (true) 1..10 else <!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue<!>) {}
|
||||
|
||||
while (<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>break<!>) {}
|
||||
@l while (<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>break@l<!>) {}
|
||||
l@ while (<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>break@l<!>) {}
|
||||
|
||||
do {} while (<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue<!>)
|
||||
@l do {} while (<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue@l<!>)
|
||||
l@ do {} while (<!BREAK_OR_CONTINUE_OUTSIDE_A_LOOP!>continue@l<!>)
|
||||
|
||||
//KT-5704
|
||||
var i = 0
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ fun test2() {
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, todo()/*comment1*/, <!UNREACHABLE_CODE!>""/*comment2*/)<!>
|
||||
}
|
||||
fun test3() {
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, @l(todo()/*comment*/), <!UNREACHABLE_CODE!>"")<!>
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, l@(todo()/*comment*/), <!UNREACHABLE_CODE!>"")<!>
|
||||
}
|
||||
|
||||
fun todo() = throw Exception()
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
//KT-5200 Mark unreachable code in lambdas
|
||||
|
||||
fun test1(): String {
|
||||
doCall @local {
|
||||
doCall local@ {
|
||||
throw NullPointerException()
|
||||
<!UNREACHABLE_CODE!>"b3"<!> //unmarked
|
||||
}
|
||||
@@ -10,7 +10,7 @@ fun test1(): String {
|
||||
}
|
||||
|
||||
fun test2(nonLocal: String, b: Boolean): String {
|
||||
doCall @local {
|
||||
doCall local@ {
|
||||
if (b) {
|
||||
return@local "b1"
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ class TestFunctionLiteral {
|
||||
val sum: (Int) -> Int = { x: Int ->
|
||||
sum(x - 1) + x
|
||||
}
|
||||
val foo: () -> Unit = @l ({ foo() })
|
||||
val foo: () -> Unit = l@ ({ foo() })
|
||||
}
|
||||
|
||||
open class A(val a: A)
|
||||
@@ -19,7 +19,7 @@ class TestObjectLiteral {
|
||||
val y = obj
|
||||
}
|
||||
}
|
||||
val obj1: A = @l ( object: A(<!UNINITIALIZED_VARIABLE!>obj1<!>) {
|
||||
val obj1: A = l@ ( object: A(<!UNINITIALIZED_VARIABLE!>obj1<!>) {
|
||||
init {
|
||||
val x = <!UNINITIALIZED_VARIABLE!>obj1<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user