[NI] Capture receiver of invoke-based call

#KT-32133 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-24 11:16:45 +03:00
parent 54d1df3147
commit bc0773b219
6 changed files with 37 additions and 1 deletions
@@ -0,0 +1,10 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv1<T>
operator fun <T> Inv1<T>.invoke(action: T.() -> Unit) {}
fun test(inv: Inv1<out Number>) {
inv { }
inv.invoke { }
}
@@ -0,0 +1,11 @@
package
public fun test(/*0*/ inv: Inv1<out kotlin.Number>): kotlin.Unit
public operator fun </*0*/ T> Inv1<T>.invoke(/*0*/ action: T.() -> kotlin.Unit): kotlin.Unit
public final class Inv1</*0*/ T> {
public constructor Inv1</*0*/ T>()
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
}