class A { fun foo() = T::toString fun bar() = U::toString } fun foo() = T::toString fun bar() = U::toString