semantic: replace typeid expressions with calls to new TypeInfo(...)