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