[NI] Resolve callable reference eagerly if there is only one candidate
#KT-30737 Fixed
This commit is contained in:
+6
-7
@@ -16,17 +16,16 @@ fun test(f1: (Int) -> Unit, f2: kotlin.Function1<Int, Unit>) {
|
||||
select3(null, f1, ::bar)
|
||||
select3(null, f2, ::bar)
|
||||
|
||||
select3(null, f1, <!TYPE_MISMATCH!>::foo<!>)
|
||||
select3(null, f2, <!TYPE_MISMATCH!>::foo<!>)
|
||||
select3(null, f1, ::foo)
|
||||
select3(null, f2, ::foo)
|
||||
|
||||
dependantSelect2(null, ::foo)
|
||||
dependantSelect3(null, ::foo, ::cloneFoo)
|
||||
dependantSelect3(null, f1, ::bar)
|
||||
dependantSelect3(null, ::bar, f1)
|
||||
|
||||
// These errors are actually can be fixed (and, probably, should) if we force resolution of callable reference
|
||||
dependantSelect3(null, ::foo, <!TYPE_MISMATCH!>::bar<!>)
|
||||
dependantSelect3(null, ::bar, <!TYPE_MISMATCH!>::foo<!>)
|
||||
dependantSelect3(null, f1, <!TYPE_MISMATCH!>::foo<!>)
|
||||
dependantSelect3(null, <!TYPE_MISMATCH!>::foo<!>, f1)
|
||||
dependantSelect3(null, ::foo, ::bar)
|
||||
dependantSelect3(null, ::bar, ::foo)
|
||||
dependantSelect3(null, f1, ::foo)
|
||||
dependantSelect3(null, ::foo, f1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user