FIR: Adjust test data after introduction of INFERENCE_NO_INFORMATION_FOR_PARAMETER

See previous commits for details
This commit is contained in:
Denis.Zharkov
2021-05-26 12:36:15 +03:00
committed by TeamCityServer
parent c420957eac
commit 0aca3a3737
160 changed files with 363 additions and 348 deletions
@@ -13,7 +13,7 @@ fun <T> id(t: T): T = t
infix fun <T> Z.foo(a: A<T>): A<T> = a
fun test(z: Z) {
z foo newA()
z <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!> newA()
val a: A<Int> = id(z foo newA())
val b: A<Int> = id(z.foo(newA()))
use(a, b)
@@ -23,7 +23,7 @@ fun test(z: Z) {
operator fun <T> Z.plus(a: A<T>): A<T> = a
fun test1(z: Z) {
<!NEW_INFERENCE_ERROR!>id(z + newA())<!>
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(z + newA())
val a: A<Z> = z + newA()
val b: A<Z> = z.plus(newA())
val c: A<Z> = id(z + newA())
@@ -35,7 +35,7 @@ fun test1(z: Z) {
operator fun <T> Z.compareTo(a: A<T>): Int { use(a); return 1 }
fun test2(z: Z) {
val a: Boolean = id(z < newA())
val a: Boolean = id(z <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!><<!> newA())
val b: Boolean = id(z < newA<Z>())
use(a, b)
}
@@ -44,18 +44,18 @@ fun test2(z: Z) {
fun Z.equals(any: Any): Int { use(any); return 1 }
fun test3(z: Z) {
z == newA()
z == <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>newA<!>()
z == newA<Z>()
id(z == newA())
id(z == <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>newA<!>())
id(z == newA<Z>())
id(z === newA())
id(z === <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>newA<!>())
id(z === newA<Z>())
}
//'in' operation
fun test4(collection: Collection<A<*>>) {
id(newA() in collection)
id(newA() <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>in<!> collection)
id(newA<Int>() in collection)
}
@@ -63,7 +63,7 @@ fun test4(collection: Collection<A<*>>) {
fun <T> toBeOrNot(): Boolean = throw Exception()
fun test5() {
if (toBeOrNot() && toBeOrNot()) {}
if (<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>toBeOrNot<!>() && <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>toBeOrNot<!>()) {}
if (toBeOrNot<Int>() && toBeOrNot<Int>()) {}
}