mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
24 lines
309 B
Kotlin
Vendored
24 lines
309 B
Kotlin
Vendored
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
interface Run {
|
|
fun run(): String
|
|
}
|
|
|
|
internal class A {
|
|
inline fun doSomething(): Run {
|
|
return object : Run {
|
|
override fun run(): String = "OK"
|
|
}
|
|
}
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
|
|
fun box(): String {
|
|
return A().doSomething().run()
|
|
}
|