Removes the type annotation and adds the newly inferred one.