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