package something trait Some { fun someFoo() fun someOtherFoo() : Int fun someGenericFoo() : T } class SomeOther : Some { override fun someFoo() { throw UnsupportedOperationException() } override fun someGenericFoo() : S { throw UnsupportedOperationException() } override fun someOtherFoo() : Int { throw UnsupportedOperationException() } }