weixin_39669075
weixin_39669075
2020-12-26 00:36

Cannot rename variable from use variable name

When renaming from a use variable as follows:

        
return \Amp\call(function () use ($checkoutTask, $wo<>rkspace, $environment) {

we get the following error:


Error from Phpactor: Expected Variable or Parameter node, got "Microsoft\PhpParser\Node\UseVariableName

Note that I think currently variable renaming is limited to the current scope (probably the function) but in this case we also need to include the parent scope.

该提问来源于开源项目:phpactor/phpactor

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39669075 weixin_39669075 4月前

    Updated the description :)

    点赞 评论 复制链接分享
  • weixin_39686634 weixin_39686634 4月前

    I hate specific :D

    点赞 评论 复制链接分享
  • weixin_39669075 weixin_39669075 4月前

    Fixed in #888

    点赞 评论 复制链接分享
  • weixin_39686634 weixin_39686634 4月前

    What is a "use variable" ?

    点赞 评论 复制链接分享

相关推荐