b454fcc1e0
This is needed to avoid clashes between different dumps from different handlers
69 lines
1.2 KiB
Kotlin
Vendored
69 lines
1.2 KiB
Kotlin
Vendored
fun use(fn: Function1<Int, Unit>) {
|
|
fn.invoke(p1 = 1)
|
|
}
|
|
|
|
class Host {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
fun withVararg(vararg xs: Int): String {
|
|
return ""
|
|
}
|
|
|
|
fun testImplicitThis() {
|
|
use(fn = { // BLOCK
|
|
local fun Host.withVararg(p0: Int) {
|
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
|
}
|
|
|
|
<this>::withVararg
|
|
})
|
|
}
|
|
|
|
fun testBoundReceiverLocalVal() {
|
|
val h: Host = Host()
|
|
use(fn = { // BLOCK
|
|
local fun Host.withVararg(p0: Int) {
|
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
|
}
|
|
|
|
h::withVararg
|
|
})
|
|
}
|
|
|
|
fun testBoundReceiverLocalVar() {
|
|
var h: Host = Host()
|
|
use(fn = { // BLOCK
|
|
local fun Host.withVararg(p0: Int) {
|
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
|
}
|
|
|
|
h::withVararg
|
|
})
|
|
}
|
|
|
|
fun testBoundReceiverParameter(h: Host) {
|
|
use(fn = { // BLOCK
|
|
local fun Host.withVararg(p0: Int) {
|
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
|
}
|
|
|
|
h::withVararg
|
|
})
|
|
}
|
|
|
|
fun testBoundReceiverExpression() {
|
|
use(fn = { // BLOCK
|
|
local fun Host.withVararg(p0: Int) {
|
|
receiver.withVararg(xs = [p0]) /*~> Unit */
|
|
}
|
|
|
|
Host()::withVararg
|
|
})
|
|
}
|
|
|
|
}
|