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:
compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedTypeAndBound.fir.kt
Vendored
-12
@@ -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<!>()
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun <T : Number> materializeNumber(): T = TODO()
|
||||
|
||||
fun a(): Unit = run {
|
||||
|
||||
Vendored
-18
@@ -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<!>()
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun <T> materialize(): T = TODO()
|
||||
|
||||
fun implicitCoercion() {
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/coercionToUnit/indirectCoercionWithExpectedType.fir.kt
Vendored
-35
@@ -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()
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun <T> materialize(): T = TODO()
|
||||
|
||||
fun a(): Unit = run {
|
||||
|
||||
Reference in New Issue
Block a user