mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 15:53:18 +00:00
18 lines
294 B
Kotlin
Vendored
18 lines
294 B
Kotlin
Vendored
// FILE: 1.kt
|
|
// LANGUAGE_VERSION: 1.2
|
|
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
|
package test
|
|
|
|
class A(val ok: String)
|
|
|
|
inline fun inlineFun(a: A, lambda: (A) -> String = A::ok): String {
|
|
return lambda(a)
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return inlineFun(A("OK"))
|
|
} |