[FIR] Fix missing receiver type if anonymous function without label
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ fun test() {
|
||||
} else {
|
||||
::foo
|
||||
}
|
||||
a checkType { <!UNRESOLVED_REFERENCE!>_<!><KFunction0<Int>>() }
|
||||
a checkType { _<KFunction0<Int>>() }
|
||||
}
|
||||
|
||||
fun foo(): Int = 0
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ fun take(f: (A) -> Unit) {}
|
||||
fun take(f: () -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
B::foo checkType { <!UNRESOLVED_REFERENCE!>_<!><KFunction1<B, Unit>>() }
|
||||
B::foo checkType { _<KFunction1<B, Unit>>() }
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>take<!>(B::foo)
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ class B : A() {
|
||||
|
||||
|
||||
fun test() {
|
||||
B::foo checkType { <!UNRESOLVED_REFERENCE!>_<!><KFunction2<B, String, String>>() }
|
||||
B::foo checkType { _<KFunction2<B, String, String>>() }
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>(B::hashCode)("No.")<!>
|
||||
}
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
import kotlin.reflect.KProperty1
|
||||
|
||||
class C {
|
||||
val baz: Int = 12
|
||||
}
|
||||
|
||||
fun Int.baz() {}
|
||||
|
||||
fun test() {
|
||||
C::baz checkType { <!UNRESOLVED_REFERENCE!>_<!><KProperty1<C, Int>>() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
|
||||
import kotlin.reflect.KProperty1
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ fun fas(i: Int = 1) {}
|
||||
fun test() {
|
||||
<!UNRESOLVED_REFERENCE!>B::foo<!> // todo KT-9601 Chose maximally specific function in callable reference
|
||||
|
||||
B::bar checkType { <!UNRESOLVED_REFERENCE!>_<!><KFunction1<B, Unit>>() }
|
||||
B::bar checkType { _<KFunction1<B, Unit>>() }
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>B::bas<!>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user