Use the new type inference for top-level callable reference resolution

^KT-47797 Fixed
^KT-47987 Fixed
^KT-45034 Fixed
^KT-48446 Fixed
^KT-13934 Fixed
This commit is contained in:
Victor Petukhov
2021-09-20 17:13:17 +03:00
parent ca13aea26a
commit ee728b6902
115 changed files with 1239 additions and 1325 deletions
@@ -22,7 +22,7 @@ fun case1() {
val x : Case1? = Case1()
<!VAL_REASSIGNMENT!>x.x<!> = "0"
<!VAL_REASSIGNMENT!>x?.x<!> = "0"
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
<!VARIABLE_EXPECTED!>x::<!TYPE_MISMATCH!>x<!><!> = TODO()
}
class Case1{
@@ -38,7 +38,7 @@ fun case2() {
val x : Case2? = Case2(null)
<!VAL_REASSIGNMENT!>x.x<!> = "0"
<!VAL_REASSIGNMENT!>x?.x<!> = "0"
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
<!VARIABLE_EXPECTED!>x::<!TYPE_MISMATCH!>x<!><!> = TODO()
}
class Case2(val x: Any?) {}
@@ -51,7 +51,7 @@ fun case3() {
val x : Case3? = Case3()
<!VAL_REASSIGNMENT!>x.x<!> = "0"
<!VAL_REASSIGNMENT!>x?.x<!> = "0"
<!VARIABLE_EXPECTED!>x::x<!> = TODO()
<!VARIABLE_EXPECTED!>x::<!TYPE_MISMATCH!>x<!><!> = TODO()
}
class Case3() {
@@ -36,15 +36,15 @@ fun case_2(a: Out<<!REDUNDANT_PROJECTION!>out<!> Out<<!REDUNDANT_PROJECTION!>out
if (a != null) {
val b = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?>?> & Out<out Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?>?>?")!>a<!>.get()
if (b != null) {
val c = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<Out<Out<Out<kotlin.Int?>?>?>?>?> & Out<Out<Out<Out<Out<kotlin.Int?>?>?>?>?>?"), DEBUG_INFO_SMARTCAST!>b<!>.get()
val c = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?> & Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?>?")!>b<!>.get()
if (c != null) {
val d = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<Out<Out<kotlin.Int?>?>?>?> & Out<Out<Out<Out<kotlin.Int?>?>?>?>?"), DEBUG_INFO_SMARTCAST!>c<!>.get()
val d = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?> & Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?")!>c<!>.get()
if (d != null) {
val e = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<Out<kotlin.Int?>?>?> & Out<Out<Out<kotlin.Int?>?>?>?"), DEBUG_INFO_SMARTCAST!>d<!>.get()
val e = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out kotlin.Int?>?>?> & Out<out Out<out Out<out kotlin.Int?>?>?>?")!>d<!>.get()
if (e != null) {
val f = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<kotlin.Int?>?> & Out<Out<kotlin.Int?>?>?"), DEBUG_INFO_SMARTCAST!>e<!>.get()
val f = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out kotlin.Int?>?> & Out<out Out<out kotlin.Int?>?>?")!>e<!>.get()
if (f != null) {
val g = <!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?"), DEBUG_INFO_SMARTCAST!>f<!>.get()
val g = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>f<!>.get()
if (g != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?"), DEBUG_INFO_SMARTCAST!>g<!>.equals(null)