FIR: Update diagnostics test data

Green code correctly became red
This commit is contained in:
Denis.Zharkov
2021-04-27 16:23:59 +03:00
committed by teamcityserver
parent 829f80179c
commit b94335dd1c
54 changed files with 101 additions and 129 deletions
@@ -10,5 +10,5 @@ fun <A, B> Foo<A>.map(f: (A) -> B): Foo<B> = object : Foo<B> {}
fun foo() {
val l: Foo<String> = object : Foo<String> {}
val m: Foo<String> = l.map { ppp -> 1 }
val m: Foo<String> = l.map { ppp -> <!ARGUMENT_TYPE_MISMATCH!>1<!> }
}
@@ -12,14 +12,14 @@ abstract class Buggy {
}
val anotherThree : Int
get() = coll.find{ it > 3 } // does not work here
get() = <!TYPE_MISMATCH!>coll.find{ it > 3 }<!> // does not work here
val yetAnotherThree : Int
get() = coll.find({ v:Int -> v > 3 }) // neither here
get() = <!TYPE_MISMATCH!>coll.find({ v:Int -> v > 3 })<!> // neither here
val extendedGetter : Int
get() {
return coll.find{ it > 3 } // not even here!
return <!TYPE_MISMATCH!>coll.find{ it > 3 }<!> // not even here!
}
}
@@ -16,6 +16,6 @@ fun <T, G> A<T>.foo(x: (T)-> G): G {
fun main() {
val a = A(1)
val t: String = a.foo({p -> p})
val t: String = a.foo({p -> <!ARGUMENT_TYPE_MISMATCH!>p<!>})
checkSubtype<String>(t)
}