Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

41 lines
495 B
Plaintext
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 = { // BLOCK
local fun foo(): String {
return foo()
}
::foo
})
}
fun testCtor(): Any {
return use(fn = { // BLOCK
local fun <init>(): C {
return C()
}
::<init>
})
}