[NI] Update test data for diagnostic tests

This commit is contained in:
Dmitriy Novozhilov
2019-03-20 15:32:41 +03:00
committed by Mikhail Zarechenskiy
parent c2a0e73a79
commit 9825984bc5
56 changed files with 130 additions and 130 deletions
@@ -22,5 +22,5 @@ val b: () -> Unit = l@{
val c: () -> Unit = {
// Interesting enough, for such expessions we use expected type Unit
// (compare that with the previous case, where we didn't used expected type Unit for "hello")
materialize()
<!NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>materialize<!>()
}
@@ -8,6 +8,6 @@ fun a(): Unit = run {
fun b(): Unit = run {
run {
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeNumber<!>()
<!NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER, NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeNumber<!>()
}
}
@@ -14,6 +14,6 @@ fun implicitCoercion() {
val <!UNUSED_VARIABLE!>c<!> = l@{
// Error: block doesn't have an expected type, so call can't be inferred!
<!NI;UNREACHABLE_CODE!>return@l<!> <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
<!NI;UNREACHABLE_CODE!>return@l<!> <!NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
}
}
@@ -11,7 +11,7 @@ fun a(): Unit = run {
fun b(): Unit = run {
// Ok, expected type is applied
materialize()
<!NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>materialize<!>()
}
fun c(): Unit = run {
@@ -19,13 +19,13 @@ fun c(): Unit = run {
// Attention!
// In OI expected type 'Unit' isn't applied here because of implementation quirks (note that OI still applies Unit in case 'e')
// In NI, it is applied and call is correctly inferred, which is consistent with the previous case
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
<!NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
}
}
fun d(): Unit = run outer@{
run inner@{
<!NI;UNREACHABLE_CODE!>return@inner<!> <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
<!NI;UNREACHABLE_CODE!>return@inner<!> <!NI;IMPLICIT_NOTHING_AS_TYPE_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
}
}