mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
18 lines
323 B
Kotlin
Vendored
18 lines
323 B
Kotlin
Vendored
// FILE: 1.kt
|
|
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
|
package test
|
|
|
|
|
|
open class Base
|
|
class Child(val value: String): Base()
|
|
|
|
inline fun inlineFun(s: (Child) -> Base = { a: Base -> a as Child}): Base {
|
|
return s(Child("OK"))
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return (inlineFun() as Child).value
|
|
} |