b454fcc1e0
This is needed to avoid clashes between different dumps from different handlers
61 lines
936 B
Plaintext
Vendored
61 lines
936 B
Plaintext
Vendored
fun use(fn: Function1<Int, Any>): Any {
|
|
return fn.invoke(p1 = 42)
|
|
}
|
|
|
|
class C {
|
|
constructor(vararg xs: Int) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class Outer {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
inner class Inner {
|
|
constructor(vararg xs: Int) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fun testConstructor(): Any {
|
|
return use(fn = { // BLOCK
|
|
local fun <init>(p0: Int): C {
|
|
return C(xs = [p0])
|
|
}
|
|
|
|
::<init>
|
|
})
|
|
}
|
|
|
|
fun testInnerClassConstructor(outer: Outer): Any {
|
|
return use(fn = { // BLOCK
|
|
local fun Outer.<init>(p0: Int): Inner {
|
|
return receiver.Inner(xs = [p0])
|
|
}
|
|
|
|
outer::<init>
|
|
})
|
|
}
|
|
|
|
fun testInnerClassConstructorCapturingOuter(): Any {
|
|
return use(fn = { // BLOCK
|
|
local fun Outer.<init>(p0: Int): Inner {
|
|
return receiver.Inner(xs = [p0])
|
|
}
|
|
|
|
Outer()::<init>
|
|
})
|
|
}
|