blob: eeb9394aa9ae897b81a7cfb2fefecab17240bf67 [file]
// IGNORE_KLIB_RUNTIME_ERRORS_WITH_CUSTOM_SECOND_STAGE: Native:2.3,2.4
fun interface Consumer<T: Int?> {
fun accept(u: T)
}
class K<T: Int?> {
fun with(b: Consumer<T>) = b
}
fun id(x: Any?) = x
fun box(): String {
val k: K<in Int?> = K()
val consumer = k.with { x: Int? -> id(x) }
consumer.accept(null)
return "OK"
}