Minor: remove some duplicate test data

Apparently if you add an empty line at the start of the FIR file, that's
not enough of a difference for the test suite to complain about, but
enough for it to not add the FIR_IDENTICAL directive...
This commit is contained in:
pyos
2023-01-02 11:54:12 +01:00
committed by Dmitriy Novozhilov
parent 5e8591d61d
commit b6653dd872
6 changed files with 3 additions and 65 deletions
@@ -1,12 +0,0 @@
fun <T : Number> materializeNumber(): T = TODO()
fun a(): Unit = run {
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeNumber<!>()
}
fun b(): Unit = run {
run {
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materializeNumber<!>()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun <T : Number> materializeNumber(): T = TODO()
fun a(): Unit = run {
@@ -1,18 +0,0 @@
fun <T> materialize(): T = TODO()
fun implicitCoercion() {
val a = {
// Block is implicitly Unit-coerced, so it is allowed to place statement at the end of lambda
if (true) 42
}
val b = l@{
return@l
}
val c = l@{
// Error: block doesn't have an expected type, so call can't be inferred!
return@l <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun <T> materialize(): T = TODO()
fun implicitCoercion() {
@@ -1,35 +0,0 @@
fun <T> materialize(): T = TODO()
fun a(): Unit = run {
run {
// Ok, block is coerced, because it has (indirectly) Unit-expected type
"hello"
}
}
fun b(): Unit = run {
// Ok, expected type is applied
materialize()
}
fun c(): Unit = run {
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
materialize()
}
}
fun d(): Unit = run outer@{
run inner@{
return@inner materialize()
}
}
fun e(): Unit = run outer@{
run inner@{
return@outer materialize()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun <T> materialize(): T = TODO()
fun a(): Unit = run {