Introduce FirFunctionReturnTypeMismatchChecker
This commit is contained in:
+1
-1
@@ -19,6 +19,6 @@ class A3<T> {
|
||||
fun test2(): (T) -> Unit = A3<T>()::a3
|
||||
fun test3(): (Int) -> String = A3<Int>()::a3
|
||||
|
||||
fun <R> test4(): (R) -> Unit = this::a3
|
||||
fun <R> test4(): (R) -> Unit = <!RETURN_TYPE_MISMATCH!>this::a3<!>
|
||||
fun <R> test5(): (T) -> R = this::a3
|
||||
}
|
||||
compiler/testData/diagnostics/tests/callableReference/unitAdaptationForReferenceCompatibility.fir.kt
Vendored
+2
-2
@@ -20,6 +20,6 @@ public interface Executor {
|
||||
fun f(): String = "test"
|
||||
|
||||
class A {
|
||||
fun schedule1(e: Executor): Future<String> = e.submit(::f)
|
||||
fun schedule2(e: Executor): Future<String> = e.submit { f() }
|
||||
fun schedule1(e: Executor): Future<String> = <!RETURN_TYPE_MISMATCH!>e.submit(::f)<!>
|
||||
fun schedule2(e: Executor): Future<String> = <!RETURN_TYPE_MISMATCH!>e.submit { f() }<!>
|
||||
}
|
||||
Reference in New Issue
Block a user