Use resolver when rewriting types.