trait A { fun String.foo() } class B : A { override fun String.foo() { throw UnsupportedOperationException() } }