Files
kotlin-fork/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt
T
Dmitry Petrov 0b647ac358 Basic class members generation.
Split testData into 'classes' and 'expressions'.
2016-10-18 09:08:32 +03:00

6 lines
191 B
Kotlin
Vendored

fun String.k(): () -> String = { -> this }
fun test1(f: () -> Unit) = f()
fun test2(f: String.() -> Unit) = "hello".f()
fun test3() = "hello".k()()
fun test4(ns: String?) = ns?.k()?.invoke()