blob: 6d9508ec44028a7765fcda7787c0aed606b01d7e [file]
// KT-3985
interface Trait<T> {
fun f(): T
}
open class Class {
fun f(): String = throw UnsupportedOperationException()
}
class Foo: Class(), Trait<String> {
}
fun box(): String {
val t: Trait<String> = Foo()
try {
t.f()
} catch (e: UnsupportedOperationException) {
return "OK"
}
return "Fail"
}