[FIR] Add checking receivers of callable references
This commit is contained in:
Vendored
+3
-3
@@ -6,10 +6,10 @@ public interface J {
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun f1(x: Int?): Any = x::hashCode
|
||||
fun f1(x: Int?): Any = <!UNRESOLVED_REFERENCE!>x::hashCode<!>
|
||||
fun <T> f2(t: T): Any = t::hashCode
|
||||
fun <S : String?> f3(s: S): Any = s::hashCode
|
||||
fun <U : Any> f4(u: U?): Any = u::hashCode
|
||||
fun f5(c: List<*>): Any = c[0]::hashCode
|
||||
fun <U : Any> f4(u: U?): Any = <!UNRESOLVED_REFERENCE!>u::hashCode<!>
|
||||
fun f5(c: List<*>): Any = <!UNRESOLVED_REFERENCE!>c[0]::hashCode<!>
|
||||
|
||||
fun f6(j: J): Any = j.platformString()::hashCode
|
||||
|
||||
Vendored
+3
-3
@@ -18,9 +18,9 @@ class Test {
|
||||
val <T> List<T>.b: Int? get() = size
|
||||
|
||||
fun <T> List<T>.testCallable1(): () -> Unit = a<T>::foo
|
||||
fun <T> List<T>.testCallable2(): () -> Unit = b?::foo
|
||||
fun <T> List<T>.testCallable3(): () -> Unit = b<T, Any>::foo
|
||||
fun <T> List<T>.testCallable4(): () -> Unit = b<T>?::foo
|
||||
fun <T> List<T>.testCallable2(): () -> Unit = <!UNRESOLVED_REFERENCE!>b?::foo<!>
|
||||
fun <T> List<T>.testCallable3(): () -> Unit = <!UNRESOLVED_REFERENCE!>b<T, Any>::foo<!>
|
||||
fun <T> List<T>.testCallable4(): () -> Unit = <!UNRESOLVED_REFERENCE!>b<T>?::foo<!>
|
||||
|
||||
fun <T> List<T>.testClassLiteral1() = a<T>::class
|
||||
fun <T> List<T>.testClassLiteral2() = b?::class
|
||||
|
||||
Vendored
+1
-1
@@ -4,4 +4,4 @@ package test
|
||||
fun nullableFun(): Int? = null
|
||||
fun Int.foo() {}
|
||||
|
||||
val test1 = nullableFun()?::foo
|
||||
val test1 = <!UNRESOLVED_REFERENCE!>nullableFun()?::foo<!>
|
||||
Reference in New Issue
Block a user