Switch off FIR version off REDUNDANT_LABEL_WARNING (performance-related)

This reverts commit 363b2550 (partially)
This commit is contained in:
Mikhail Glukhikh
2021-10-27 09:07:01 +03:00
committed by TeamCityServer
parent 36c4938172
commit b0ec3cb831
39 changed files with 255 additions and 57 deletions
@@ -50,4 +50,4 @@ class Test7 {
<!NOT_A_LOOP_LABEL!>break@Test8<!>
}
}
}
}
@@ -51,12 +51,12 @@ fun testLoopLabelInReturn(xs: List<Int>) {
}
fun testValLabelInReturn() {
<!REDUNDANT_LABEL_WARNING!>L@<!> val fn = { <!NOT_A_FUNCTION_LABEL!>return@L<!> }
L@ val fn = { <!NOT_A_FUNCTION_LABEL!>return@L<!> }
fn()
}
fun testHighOrderFunctionCallLabelInReturn() {
<!REDUNDANT_LABEL_WARNING!>L@<!> run {
L@ run {
<!NOT_A_FUNCTION_LABEL!>return@L<!>
}
}
@@ -51,12 +51,12 @@ fun testLoopLabelInReturn(xs: List<Int>) {
}
fun testValLabelInReturn() {
<!REDUNDANT_LABEL_WARNING!>L@<!> val fn = { <!NOT_A_FUNCTION_LABEL!>return@L<!> }
L@ val fn = { <!NOT_A_FUNCTION_LABEL!>return@L<!> }
fn()
}
fun testHighOrderFunctionCallLabelInReturn() {
<!REDUNDANT_LABEL_WARNING!>L@<!> run {
L@ run {
<!NOT_A_FUNCTION_LABEL!>return@L<!>
}
}
@@ -0,0 +1,39 @@
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann
fun testLambdaLabel() = l@ { 42 }
fun testAnonymousFunctionLabel() = l@ fun() {}
fun testAnnotatedLambdaLabel() = lambda@ @Ann {}
fun testParenthesizedLambdaLabel() = lambda@ ( {} )
fun testLabelBoundToInvokeOperatorExpression() = l@ { 42 }()
fun testLabelBoundToLambda() = (l@ { 42 })()
fun testWhileLoopLabel() {
L@ while (true) {}
}
fun testDoWhileLoopLabel() {
L@ do {} while (true)
}
fun testForLoopLabel(xs: List<Any>) {
L@ for (x in xs) {}
}
fun testValLabel() {
L@ val fn = {}
fn()
}
fun testHighOrderFunctionCallLabel() {
L@ run {}
}
fun testAnonymousObjectLabel() =
L@ object {}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
@Target(AnnotationTarget.EXPRESSION)
@Retention(AnnotationRetention.SOURCE)
annotation class Ann