useless cast from T to T is removed