FIR: Refine callable reference resolution in assignment position

synthetic_select<() -> T>(::foo) form allows to select better candidate
than synthetic_select(::foo) with expect type `() -> T`
This commit is contained in:
Denis.Zharkov
2021-11-08 12:00:19 +03:00
committed by teamcity
parent 65d7da122f
commit 6e15ee8fea
14 changed files with 83 additions and 20 deletions
@@ -17,7 +17,7 @@ public class Inv<T> {
// FILE: test.kt
fun test(inv: Inv<String>) {
val m: ((String) -> String) -> Inv<String> = <!INITIALIZER_TYPE_MISMATCH!>inv::map<!>
val m: ((String) -> String) -> Inv<String> = inv::<!UNRESOLVED_REFERENCE!>map<!>
<!INAPPLICABLE_CANDIDATE!>take<!>(inv::<!UNRESOLVED_REFERENCE!>map<!>)
}