FIR: Update test data (NEW_INFERENCE_ERROR)

Though these diagnostics look correct (the calls or constraint
systems indeed contain errors), more precise diagnostic kinds should be
chosen later.
This commit is contained in:
Denis.Zharkov
2021-04-28 10:58:42 +03:00
committed by teamcityserver
parent 010a0c6cdc
commit da3233c47d
19 changed files with 58 additions and 45 deletions
@@ -3,11 +3,11 @@
fun <T : Number> materializeNumber(): T = TODO()
fun a(): Unit = run {
materializeNumber()
<!NEW_INFERENCE_ERROR!>materializeNumber()<!>
}
fun b(): Unit = run {
run {
materializeNumber()
<!NEW_INFERENCE_ERROR!>materializeNumber()<!>
}
}
@@ -0,0 +1,14 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Base
class Foo : Base
fun <T : Base> myRun(action: () -> T): T = action()
fun foo(f: (Foo) -> Unit) {}
fun main() {
foo { f: Foo ->
<!NEW_INFERENCE_ERROR!>myRun { f }<!>
}
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Base
@@ -12,4 +11,4 @@ fun main() {
foo { f: Foo ->
myRun { f }
}
}
}