K2: Do not use KFunctionN as representation type for adapted references

Beside some corner cases, it's already prohibited in K1 because
adaptation have a bit strange nature
(they don't represent any existing real function exactly)

^KT-55137 Fixed
This commit is contained in:
Denis.Zharkov
2022-11-25 18:19:10 +01:00
committed by Space Team
parent dcdc48a233
commit a38040680c
17 changed files with 102 additions and 18 deletions
@@ -27,7 +27,7 @@ class Case2() {
}
fun case() {
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Int, kotlin.String>")!>::invoke<!>, <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Int, kotlin.String>")!>::invoke<!>)
foo(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Int, kotlin.String>")!>::invoke<!>, <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Int, kotlin.String>")!>::invoke<!>)
foo(::invoke, ::invoke)
<!DEBUG_INFO_CALL("fqName: Case2.foo; typeCall: function")!>foo(::invoke, ::invoke)<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>foo(::invoke, ::invoke)<!>