mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
19 lines
315 B
Kotlin
Vendored
19 lines
315 B
Kotlin
Vendored
// FILE: 1.kt
|
|
// WITH_RUNTIME
|
|
|
|
package test
|
|
inline fun inlineFun(vararg constraints: String, receiver: String = "K", init: String.() -> String): String {
|
|
return (constraints.joinToString() + receiver).init()
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return inlineFun("O") {
|
|
this
|
|
}
|
|
}
|
|
|