mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
16 lines
217 B
Kotlin
Vendored
16 lines
217 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
inline class A(val s: String)
|
|
|
|
abstract class B<T> {
|
|
abstract fun f(x: T): T
|
|
}
|
|
|
|
class C: B<A>() {
|
|
override fun f(x: A): A = x
|
|
}
|
|
|
|
fun box(): String {
|
|
return C().f(A("OK")).s
|
|
}
|