Correct printing generic methods in traits