K2: disable compatibility mode for new inference
#KT-64306 Fixed #KT-64307 Fixed #KT-64308 Fixed
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@ object Scope {
|
||||
fun test() {
|
||||
// Despite the fact ::bar is resolved with compatibility warning, it's important not to propagate it to the outer call
|
||||
val result = <!DEBUG_INFO_CALL("fqName: Scope.foo; typeCall: function")!>foo(::bar)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>result<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -9,7 +9,7 @@ object Test1 {
|
||||
|
||||
fun test() {
|
||||
val result = foo(::bar)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ object Test3 {
|
||||
|
||||
fun test() {
|
||||
val result = foo(::bar)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,4 +54,4 @@ object Test4 {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compiler/testData/diagnostics/tests/callableReference/unitAdaptationForReferenceCompatibility.fir.kt
Vendored
+1
-1
@@ -20,6 +20,6 @@ public interface Executor {
|
||||
fun f(): String = "test"
|
||||
|
||||
class A {
|
||||
fun schedule1(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