Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferences/kt37131.fir.kt.txt
T
2021-02-15 17:08:13 +03:00

35 lines
426 B
Kotlin
Vendored

fun foo(x: String = ""): String {
return x
}
class C {
constructor(x: String = "") /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: String
field = x
get
}
fun use(fn: Function0<Any>): Any {
return fn.invoke()
}
fun testFn(): Any {
return use(fn = local fun foo(): String {
return foo()
}
)
}
fun testCtor(): Any {
return use(fn = local fun <init>(): C {
return C()
}
)
}