[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
Vendored
+2
-3
@@ -1,9 +1,8 @@
|
||||
package a
|
||||
|
||||
fun <T, R, S> foo(block: (T)-> R, <!UNUSED_PARAMETER!>second<!>: (T)-> S) = block
|
||||
fun <T, R, S> foo(block: (T)-> R, second: (T)-> S) = block
|
||||
|
||||
fun main() {
|
||||
val fff = { <!UNUSED_ANONYMOUS_PARAMETER!>x<!>: Int -> <!UNRESOLVED_REFERENCE!>aaa<!> }
|
||||
val fff = { x: Int -> <!UNRESOLVED_REFERENCE!>aaa<!> }
|
||||
foo(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>fff<!>, { x -> x + 1 })
|
||||
}
|
||||
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
package a
|
||||
|
||||
interface Closeable {}
|
||||
class C : Closeable {}
|
||||
|
||||
fun <T: Closeable, R> T.foo(block: (T)-> R) = block
|
||||
|
||||
fun <T: Closeable, R> T.foo(block: (T, T)-> R) = block
|
||||
|
||||
fun main() {
|
||||
C().foo { // no ambiguity here
|
||||
www ->
|
||||
<!UNRESOLVED_REFERENCE!>xs<!>
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
package a
|
||||
@@ -11,8 +12,7 @@ fun <T: Closeable, R> T.foo(block: (T, T)-> R) = block
|
||||
|
||||
fun main() {
|
||||
C().foo { // no ambiguity here
|
||||
<!UNUSED_ANONYMOUS_PARAMETER!>www<!> ->
|
||||
www ->
|
||||
<!UNRESOLVED_REFERENCE!>xs<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -5,13 +5,13 @@ fun <T, R> foo(block: (T)-> R) = block
|
||||
|
||||
fun test1() {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>foo<!> {
|
||||
<!CANNOT_INFER_PARAMETER_TYPE, UNUSED_ANONYMOUS_PARAMETER!>x<!> -> // here we have 'cannot infer parameter type' error
|
||||
<!CANNOT_INFER_PARAMETER_TYPE!>x<!> -> // here we have 'cannot infer parameter type' error
|
||||
43
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(<!UNUSED_PARAMETER!>f<!>: (<!UNRESOLVED_REFERENCE!>A<!>)->Unit) {}
|
||||
fun bar(f: (<!UNRESOLVED_REFERENCE!>A<!>)->Unit) {}
|
||||
|
||||
fun test2() {
|
||||
bar { <!UNUSED_ANONYMOUS_PARAMETER!>a<!> -> } // here we don't have 'cannot infer parameter type' error
|
||||
bar { a -> } // here we don't have 'cannot infer parameter type' error
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@ fun main2() = if (true) <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo::<!UNR
|
||||
|
||||
fun main3() = if (true) { Foo::<!UNRESOLVED_REFERENCE!>minus<!> } else { Foo::<!UNRESOLVED_REFERENCE!>times<!> }
|
||||
|
||||
fun main4() = try { Foo::<!UNRESOLVED_REFERENCE!>minus<!> } finally { <!UNUSED_EXPRESSION!>Foo::<!UNRESOLVED_REFERENCE!>times<!><!> }
|
||||
fun main4() = try { Foo::<!UNRESOLVED_REFERENCE!>minus<!> } finally { Foo::<!UNRESOLVED_REFERENCE!>times<!> }
|
||||
|
||||
fun main5() = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo::<!UNRESOLVED_REFERENCE!>minus<!><!> ?: <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo::<!UNRESOLVED_REFERENCE!>times<!><!>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>a<!> = <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>-<!>false
|
||||
val a = <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>-<!>false
|
||||
}
|
||||
|
||||
operator fun A.unaryMinus() {}
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@ fun <R> foo (f: ()->R, r: MutableList<R>) = r.add(f())
|
||||
fun <R> bar (r: MutableList<R>, f: ()->R) = r.add(f())
|
||||
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>a<!> = <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS{OI}!>foo<!>({1}, arrayListOf("")) //no type inference error on 'arrayListOf'
|
||||
val <!UNUSED_VARIABLE!>b<!> = <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS{OI}!>bar<!>(arrayListOf(""), {1})
|
||||
val a = <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS{OI}!>foo<!>({1}, arrayListOf("")) //no type inference error on 'arrayListOf'
|
||||
val b = <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS{OI}!>bar<!>(arrayListOf(""), {1})
|
||||
}
|
||||
|
||||
// from standard library
|
||||
fun <T> arrayListOf(vararg <!UNUSED_PARAMETER!>values<!>: T) : MutableList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
fun <T> arrayListOf(vararg values: T) : MutableList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
Reference in New Issue
Block a user