Stop tower resolve in K2 in more similar manner with K1

This commit is contained in:
Mikhail Glukhikh
2022-07-19 08:43:51 +02:00
committed by Space
parent 26ed21ec96
commit 32a73968de
21 changed files with 36 additions and 37 deletions
@@ -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.String")!>result<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>result<!>
}
}
}
@@ -9,7 +9,7 @@ object Test1 {
fun test() {
val result = foo(::bar)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
}
}
}
@@ -36,7 +36,7 @@ object Test3 {
fun test() {
val result = foo(::bar)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
}
}
}
@@ -12,7 +12,7 @@ object Test1 {
fun foo(r: KRunnable) {}
fun test(f: () -> Unit) {
<!DEBUG_INFO_CALL("fqName: Test1.Scope.foo; typeCall: function")!>foo(f)<!>
<!DEBUG_INFO_CALL("fqName: Test1.foo; typeCall: function")!>foo(f)<!>
}
}
}
@@ -18,7 +18,7 @@ object Test1 {
fun foo(r: Runnable) {}
fun test(f: () -> Unit) {
<!DEBUG_INFO_CALL("fqName: Test1.Scope.foo; typeCall: function")!>foo(f)<!>
<!DEBUG_INFO_CALL("fqName: Test1.foo; typeCall: function")!>foo(f)<!>
}
}
}
@@ -65,7 +65,7 @@ object Test5 {
fun foo(r: Runnable) {}
fun test() {
<!DEBUG_INFO_CALL("fqName: Test5.Scope.foo; typeCall: function")!>foo { }<!>
<!DEBUG_INFO_CALL("fqName: Test5.foo; typeCall: function")!>foo { }<!>
}
}
}
@@ -12,7 +12,7 @@ object Test1 {
fun call(r: SuspendRunnable) {}
fun bar(f: () -> Unit) {
<!DEBUG_INFO_CALL("fqName: Test1.Scope.call; typeCall: function")!>call(f)<!>
<!DEBUG_INFO_CALL("fqName: Test1.call; typeCall: function")!>call(f)<!>
}
}
}
@@ -22,7 +22,7 @@ object Test2 {
fun test() {
val result = foo(::bar)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
}
}
}
@@ -29,7 +29,7 @@ object Test2 {
fun test() {
val result = foo(::bar)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>result<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>result<!>
}
}
}
@@ -17,5 +17,5 @@ fun bar(x: MutableList<String>, y: java.util.ArrayList<String>, z: A) {
x.<!DEPRECATION_ERROR!>sort<!> { a, b -> a.length - b.length }
y.sort { a, b -> a.length - b.length }
z.sort { a, b -> a.length - b.length }
z.<!DEPRECATION_ERROR!>sort<!> { a, b -> a.length - b.length }
}