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
@@ -22,6 +22,6 @@ class A3<T> {
fun test2(): (T) -> Unit = A3<T>()::a3
fun test3(): (Int) -> String = A3<Int>()::a3
fun <R> test4(): (R) -> Unit = <!RETURN_TYPE_MISMATCH!>this::a3<!>
fun <R> test4(): (R) -> Unit = this::<!UNRESOLVED_REFERENCE!>a3<!>
fun <R> test5(): (T) -> R = this::a3
}
}