Files
kotlin-fork/compiler/testData/ir/irText/expressions/sam/samConstructors.kt
T
Dmitry Petrov 85f55dec9a Support SAM conversion in psi2ir
SAM conversion takes a function value (function type or a subtype),
and produces a SAM interface value.
2018-12-19 10:58:34 +03:00

7 lines
122 B
Kotlin
Vendored

// WITH_JDK
fun test1() = Runnable { }
fun test2(a: () -> Unit) = Runnable(a)
fun foo() {}
fun test3() = Runnable(::foo)