generic type with two type bounds