Support for generics in traits