[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite
This commit is contained in:
committed by
TeamCityServer
parent
85949b387e
commit
cd890d5833
@@ -6,7 +6,7 @@ import java.util.Comparator
|
||||
|
||||
fun foo() {
|
||||
|
||||
val <!UNUSED_VARIABLE!>c<!>: Comparator<Date?> = comparator { date1, date2 ->
|
||||
val c: Comparator<Date?> = comparator { date1, date2 ->
|
||||
if (date1 != null && date2 != null) {
|
||||
date1.compareTo(date2) * -11
|
||||
} else {
|
||||
@@ -17,8 +17,8 @@ fun foo() {
|
||||
|
||||
fun bar(i: Int, a: <!UNRESOLVED_REFERENCE!>U<!>) {
|
||||
val r = if (true) i else <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>
|
||||
val <!UNUSED_VARIABLE!>b<!>: Any = r
|
||||
val b: Any = r
|
||||
}
|
||||
|
||||
//from standard library
|
||||
public inline fun <T> comparator(<!UNUSED_PARAMETER!>fn<!>: (T,T) -> Int): Comparator<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
public inline fun <T> comparator(fn: (T,T) -> Int): Comparator<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
+3
-3
@@ -4,13 +4,13 @@ package d
|
||||
|
||||
interface A<T>
|
||||
|
||||
fun <T> infer(<!UNUSED_PARAMETER!>a<!>: A<T>) : T {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
fun <T> infer(a: A<T>) : T {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
fun test(nothing: Nothing?) {
|
||||
val <!UNUSED_VARIABLE!>i<!> = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_INCORPORATION_ERROR{OI}!>infer<!>(<!DEBUG_INFO_CONSTANT, TYPE_MISMATCH!>nothing<!>)
|
||||
val i = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_INCORPORATION_ERROR{OI}!>infer<!>(<!DEBUG_INFO_CONSTANT, TYPE_MISMATCH!>nothing<!>)
|
||||
}
|
||||
|
||||
fun sum(<!UNUSED_PARAMETER!>a<!> : IntArray) : Int {
|
||||
fun sum(a : IntArray) : Int {
|
||||
for (n
|
||||
<!SYNTAX!>return<!><!SYNTAX!><!> "?"
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
fun test(a: Any) {
|
||||
when (a)<!SYNTAX!><!>
|
||||
}
|
||||
Vendored
+3
-2
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun test(a: Any) {
|
||||
when (<!UNUSED_EXPRESSION!>a<!>)<!SYNTAX!><!>
|
||||
}
|
||||
when (a)<!SYNTAX!><!>
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,11 +1,10 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
package b
|
||||
|
||||
fun <T, R> foo(<!UNUSED_PARAMETER!>map<!>: Map<T, R>) : R = throw Exception()
|
||||
fun <T, R> foo(map: Map<T, R>) : R = throw Exception()
|
||||
|
||||
fun <F, G> getMap() : Map<F, G> = throw Exception()
|
||||
|
||||
fun bar123() {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>foo<!>(<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>getMap<!>(
|
||||
<!SYNTAX!><!>}
|
||||
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
fun test1() {
|
||||
try {
|
||||
|
||||
} catch (<!SYNTAX!><!>)<!SYNTAX!><!>
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
try { }<!SYNTAX!><!>
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
try {
|
||||
} catch (<!SYNTAX!><!>{}<!SYNTAX!>)<!> {}
|
||||
}
|
||||
+3
-2
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun test1() {
|
||||
try {
|
||||
|
||||
@@ -10,5 +11,5 @@ fun test2() {
|
||||
|
||||
fun test3() {
|
||||
try {
|
||||
} catch (<!SYNTAX!><!>{}<!SYNTAX!>)<!> <!UNUSED_LAMBDA_EXPRESSION!>{}<!>
|
||||
}
|
||||
} catch (<!SYNTAX!><!>{}<!SYNTAX!>)<!> {}
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//KT-1955 Half a file is red on incomplete code
|
||||
|
||||
package b
|
||||
|
||||
fun foo() {
|
||||
val a = 1<!SYNTAX!><!>
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-1955 Half a file is red on incomplete code
|
||||
|
||||
package b
|
||||
|
||||
fun foo() {
|
||||
val <!UNUSED_VARIABLE!>a<!> = 1<!SYNTAX!><!>
|
||||
|
||||
|
||||
val a = 1<!SYNTAX!><!>
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package b
|
||||
|
||||
fun foo() {
|
||||
for (i in <!UNRESOLVED_REFERENCE!>collection<!>) {
|
||||
<!UNUSED_LAMBDA_EXPRESSION!>{
|
||||
{
|
||||
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>break<!>
|
||||
}<!>
|
||||
}
|
||||
}<!SYNTAX!><!>
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
fun foo(s: String) {
|
||||
s.<!SYNTAX!><!>
|
||||
val b = 42
|
||||
}
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
fun foo(s: String) {
|
||||
s.<!SYNTAX!><!>
|
||||
val <!UNUSED_VARIABLE!>b<!> = 42
|
||||
val b = 42
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user