mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
18 lines
235 B
Kotlin
Vendored
18 lines
235 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
inline class A(val s: String)
|
|
|
|
interface B<T> {
|
|
fun f(x: T): T
|
|
}
|
|
|
|
open class C {
|
|
open fun f(x: A): A = A("OK")
|
|
}
|
|
|
|
class D : C(), B<A>
|
|
|
|
fun box(): String {
|
|
return (D() as B<A>).f(A("Fail")).s
|
|
}
|