[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite

This commit is contained in:
Dmitriy Novozhilov
2021-03-29 12:14:16 +03:00
committed by TeamCityServer
parent 85949b387e
commit cd890d5833
758 changed files with 1832 additions and 3745 deletions
@@ -14,4 +14,4 @@ fun myMap(x: List<Int>): Int {
return 0
}
infix fun List<Int>.myMap(<!UNUSED_PARAMETER!>x<!>: () -> Unit) {}
infix fun List<Int>.myMap(x: () -> Unit) {}
+3 -3
View File
@@ -1,5 +1,5 @@
fun nonlocals(b : Boolean) {
a@<!UNUSED_LAMBDA_EXPRESSION!>{
a@{
fun foo() {
if (b) {
<!RETURN_NOT_ALLOWED!>return@a<!> 1 // The label must be resolved, but an error should be reported for a non-local return
@@ -7,5 +7,5 @@ fun nonlocals(b : Boolean) {
}
return@a 5
}<!>
}
}
}
@@ -1,21 +0,0 @@
//KT-3988 This@label for outer function not resolved
class Comment() {
var article = ""
}
class Comment2() {
var article2 = ""
}
fun new(body: Comment.() -> Unit) = body
fun new2(body: Comment2.() -> Unit) = body
fun main() {
new {
new2 {
this@new //UNRESOLVED REFERENCE
}
}
}
+3 -2
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
//KT-3988 This@label for outer function not resolved
class Comment() {
@@ -15,7 +16,7 @@ fun new2(body: Comment2.() -> Unit) = body
fun main() {
new {
new2 {
<!UNUSED_EXPRESSION!>this@new<!> //UNRESOLVED REFERENCE
this@new //UNRESOLVED REFERENCE
}
}
}
}
+3 -3
View File
@@ -1,11 +1,11 @@
//KT-591 Unresolved label in valid code
fun test() {
val <!UNUSED_VARIABLE!>a<!>: (Int?).() -> Unit = a@{
val a: (Int?).() -> Unit = a@{
if (this != null) {
val <!UNUSED_VARIABLE!>b<!>: String.() -> Unit = {
val b: String.() -> Unit = {
<!DEBUG_INFO_SMARTCAST!>this@a<!>.times(5) // a@ Unresolved
}
}
}
}
}
@@ -14,7 +14,7 @@ fun foo(a: Any?): Int {
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>b<!> = 1
<!UNUSED_VALUE!>(<!SYNTAX!>@<!> b) =<!> 2
(<!SYNTAX!>@<!> b) = 2
return<!SYNTAX!>@<!> 1
}
@@ -33,4 +33,4 @@ class B : A() {
fun bar(f: () -> Unit) = f
fun test() {
bar <!SYNTAX!>@<!>{}
}
}