mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 08:31:29 +00:00
21 lines
263 B
Kotlin
Vendored
21 lines
263 B
Kotlin
Vendored
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
class Foo {
|
|
fun foo() = "OK"
|
|
}
|
|
|
|
inline fun inlineFn(crossinline fn: () -> String, x: Int? = 1): String {
|
|
return fn()
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
private val foo = Foo()
|
|
|
|
fun box(): String {
|
|
return inlineFn(foo::foo)
|
|
} |