mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
19 lines
265 B
Kotlin
Vendored
19 lines
265 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
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
|
|
}
|