85f55dec9a
SAM conversion takes a function value (function type or a subtype), and produces a SAM interface value.
7 lines
122 B
Kotlin
Vendored
7 lines
122 B
Kotlin
Vendored
// WITH_JDK
|
|
fun test1() = Runnable { }
|
|
|
|
fun test2(a: () -> Unit) = Runnable(a)
|
|
|
|
fun foo() {}
|
|
fun test3() = Runnable(::foo) |