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
@@ -6,5 +6,5 @@ fun foo(i: Int) {}
val fn1: (Int) -> Unit = ::foo
val fn2: (IntArray) -> Unit = ::foo
val fn3: (Int, Int) -> Unit = ::foo
val fn4: (Array<String>) -> Unit = ::foo
val fn3: (Int, Int) -> Unit = ::<!UNRESOLVED_REFERENCE!>foo<!>
val fn4: (Array<String>) -> Unit = ::foo