[NI] Fix adapting arguments for callable references with receivers
#KT-35912 Fixed
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KFunction2
|
||||
|
||||
class Foo
|
||||
|
||||
fun test(fn: KFunction2<Foo, Array<out String>, String>) = null
|
||||
|
||||
fun Foo.bar(vararg x: String) = ""
|
||||
fun Foo.bar(vararg x: Int) = ""
|
||||
|
||||
|
||||
fun actualTest() {
|
||||
<!INAPPLICABLE_CANDIDATE!>test<!>(<!UNRESOLVED_REFERENCE!>Foo::bar<!>)
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KFunction2
|
||||
|
||||
class Foo
|
||||
|
||||
fun test(fn: KFunction2<Foo, Array<out String>, String>) = null
|
||||
|
||||
fun Foo.bar(vararg x: String) = ""
|
||||
fun Foo.bar(vararg x: Int) = ""
|
||||
|
||||
|
||||
fun actualTest() {
|
||||
test(Foo::bar)
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package
|
||||
|
||||
public fun actualTest(): kotlin.Unit
|
||||
public fun test(/*0*/ fn: kotlin.reflect.KFunction2<Foo, kotlin.Array<out kotlin.String>, kotlin.String>): kotlin.Nothing?
|
||||
public fun Foo.bar(/*0*/ vararg x: kotlin.String /*kotlin.Array<out kotlin.String>*/): kotlin.String
|
||||
public fun Foo.bar(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.String
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user