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:
+6
-6
@@ -17,11 +17,11 @@ class Case1() {
|
||||
|
||||
}
|
||||
fun case1() {
|
||||
val y0: (String)-> Case1 = ::foo
|
||||
val y1: (String)-> Case1 = Case1.Companion::foo
|
||||
val y2: (String)-> Case1 = (Case1)::foo
|
||||
val y0: (String)-> Case1 = ::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
val y1: (String)-> Case1 = Case1.Companion::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
val y2: (String)-> Case1 = (Case1)::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
}
|
||||
|
||||
fun case1_0() : (String)-> Case1 = ::foo
|
||||
fun case1_1() : (String)-> Case1 = (Case1)::foo
|
||||
fun case1_2(): (String)-> Case1 = Case1.Companion::foo
|
||||
fun case1_0() : (String)-> Case1 = ::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
fun case1_1() : (String)-> Case1 = (Case1)::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
fun case1_2(): (String)-> Case1 = Case1.Companion::<!UNRESOLVED_REFERENCE!>foo<!>
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import libCase1.*
|
||||
import kotlin.text.format
|
||||
|
||||
fun case1() {
|
||||
val y2 : () ->String =(String)::<!UNRESOLVED_REFERENCE!>format<!>
|
||||
val y2 : () ->String =(String)::format
|
||||
}
|
||||
|
||||
// FILE: LibCase1.kt
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ package testsCase1
|
||||
class Case() {
|
||||
fun case(v: V) {
|
||||
// InitializertTypeCheckerMismatch bug
|
||||
val va: () -> String = <!INITIALIZER_TYPE_MISMATCH!>(V)::a<!>
|
||||
val va: () -> String = (V)::a
|
||||
|
||||
val vb: () -> String = (V)::b
|
||||
|
||||
|
||||
Reference in New Issue
Block a user