[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
+7 -7
View File
@@ -154,23 +154,23 @@ fun illegalWhenBlock(a: Any): Int {
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
fun declarations(a: Any?) {
if (a is String) {
val <!UNUSED_VARIABLE!>p4<!>: String = <!DEBUG_INFO_SMARTCAST!>a<!>
val p4: String = <!DEBUG_INFO_SMARTCAST!>a<!>
}
if (a is String?) {
if (a != null) {
val <!UNUSED_VARIABLE!>s<!>: String = <!DEBUG_INFO_SMARTCAST!>a<!>
val s: String = <!DEBUG_INFO_SMARTCAST!>a<!>
}
}
if (a != null) {
if (a is String?) {
val <!UNUSED_VARIABLE!>s<!>: String = <!DEBUG_INFO_SMARTCAST!>a<!>
val s: String = <!DEBUG_INFO_SMARTCAST!>a<!>
}
}
}
fun vars(a: Any?) {
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>b<!>: Int = 0
if (a is Int) {
<!UNUSED_VALUE!>b =<!> <!DEBUG_INFO_SMARTCAST!>a<!>
b = <!DEBUG_INFO_SMARTCAST!>a<!>
}
}
fun returnFunctionLiteralBlock(a: Any?): Function0<Int> {
@@ -199,7 +199,7 @@ fun mergeSmartCasts(a: Any?) {
is String, is Any -> a.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
}
if (a is String && <!USELESS_IS_CHECK!>a is Any<!>) {
val <!UNUSED_VARIABLE!>i<!>: Int = <!DEBUG_INFO_SMARTCAST!>a<!>.compareTo("")
val i: Int = <!DEBUG_INFO_SMARTCAST!>a<!>.compareTo("")
}
if (a is String && <!DEBUG_INFO_SMARTCAST!>a<!>.compareTo("") == 0) {}
if (a is String || a.<!UNRESOLVED_REFERENCE!>compareTo<!>("") <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE{OI}, DEBUG_INFO_MISSING_UNRESOLVED{NI}!>==<!> 0) {}
@@ -210,10 +210,10 @@ fun f(): String {
var a: Any = 11
if (a is String) {
// a is a string, despite of being a variable
val <!UNUSED_VARIABLE!>i<!>: String = <!DEBUG_INFO_SMARTCAST!>a<!>
val i: String = <!DEBUG_INFO_SMARTCAST!>a<!>
<!DEBUG_INFO_SMARTCAST!>a<!>.compareTo("f")
// Beginning from here a is captured in a closure but nobody modifies it
val <!UNUSED_VARIABLE!>f<!>: Function0<String> = { <!DEBUG_INFO_SMARTCAST!>a<!> }
val f: Function0<String> = { <!DEBUG_INFO_SMARTCAST!>a<!> }
return <!DEBUG_INFO_SMARTCAST!>a<!>
}
return ""