Skip to content

fix(38815): Extract to function crash #38865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2020

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #38815

In #38107 to skip global function refactoring (when arrow function uses this, extract-method38.ts, extract-method39.ts), I added checking arrow function, to find this usage., It caused that during checking arrow function body, service finds return and marks as used too. I changed that, to find only this in arrow function, and skip dive into further checking. If there is a much better way to do that, I would be grateful if you could please point me out about it.

cc @andrewbranch

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @a-tarasyuk! This approach makes sense to me.

@andrewbranch andrewbranch added the For Milestone Bug PRs that fix a bug with a specific milestone label Jun 1, 2020
@andrewbranch andrewbranch merged commit 68d2ee0 into microsoft:master Jun 1, 2020
cangSDARM added a commit to cangSDARM/TypeScript that referenced this pull request Jun 2, 2020
* upstream/master: (78 commits)
  LEGO: check in for master to temporary branch.
  Skip default when initially iterating exports in __importStar, same as __exportStar (microsoft#38808)
  fix line endings
  Improve error range for ts2657 (jsx expr must have parent element), add code fix for it (microsoft#37917)
  fix(32341): add prefix name for module exports properties (microsoft#38541)
  fix(19385): add space after brace in the multiline string template (microsoft#38742)
  fix(38815): dive in arrow functions to check only this usage instead of checking all statements (microsoft#38865)
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  Convert HTML tags in doc-comments into markdown
  fix linting error
  LEGO: check in for master to temporary branch.
  LEGO: check in for master to temporary branch.
  fix(38722): change error message for use-before-declaration on const enum (microsoft#38728)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract to function crash
2 participants