"invoke" from function types do not have any meaningful parameter names
This commit is contained in:
@@ -4,6 +4,8 @@ class A(foo: Int.() -> Unit) {
|
||||
}
|
||||
}
|
||||
|
||||
fun test(foo: Int.() -> Unit) {
|
||||
4.foo()
|
||||
fun test(foo: Int.(String) -> Unit) {
|
||||
4.foo("")
|
||||
4.foo(<!NAMED_ARGUMENTS_NOT_ALLOWED, NAMED_PARAMETER_NOT_FOUND!>p1<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
4.foo(<!NAMED_ARGUMENTS_NOT_ALLOWED!>p2<!> = "")
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ foo: kotlin.Int.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(/*0*/ foo: kotlin.Int.(kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public final class A {
|
||||
public constructor A(/*0*/ foo: kotlin.Int.() -> kotlin.Unit)
|
||||
|
||||
+2
-2
@@ -22,6 +22,6 @@ fun test2(f: (String) -> Unit) {
|
||||
|
||||
fun test3(f: String.(String) -> Unit) {
|
||||
"".f("")
|
||||
"".f(<!NAMED_PARAMETER_NOT_FOUND!>p0<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
"".f(<!NAMED_PARAMETER_NOT_FOUND!>zzz<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
"".f(<!NAMED_ARGUMENTS_NOT_ALLOWED, NAMED_PARAMETER_NOT_FOUND!>p0<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
"".f(<!NAMED_ARGUMENTS_NOT_ALLOWED, NAMED_PARAMETER_NOT_FOUND!>zzz<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ fun test(a: A) {
|
||||
|
||||
Resolved call:
|
||||
|
||||
Resulting descriptor: operator fun invoke(p1: Int): Int defined in kotlin.Function1
|
||||
Resulting descriptor: operator fun invoke(Int): Int defined in kotlin.Function1
|
||||
|
||||
Explicit receiver kind = DISPATCH_RECEIVER
|
||||
Dispatch receiver = foo {Function1<Int, Int>}
|
||||
|
||||
Reference in New Issue
Block a user