12 lines
213 B
Kotlin
Vendored
12 lines
213 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// IGNORE_BACKEND: JVM, WASM
|
|
interface I<T> {
|
|
fun foo(x: T): T
|
|
}
|
|
|
|
class C : I<Result<Any?>> {
|
|
override fun foo(x: Result<Any?>) = x
|
|
}
|
|
|
|
fun box() = C().foo(Result.success("OK")).getOrNull()
|