Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(38815): Extract to function crash#38865

Merged
andrewbranch merged 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
a-tarasyuk:bug/38815a-tarasyuk/TypeScript:bug/38815Copy head branch name to clipboard
Jun 1, 2020
Merged

fix(38815): Extract to function crash#38865
andrewbranch merged 1 commit into
microsoft:mastermicrosoft/TypeScript:masterfrom
a-tarasyuk:bug/38815a-tarasyuk/TypeScript:bug/38815Copy head branch name to clipboard

Conversation

@a-tarasyuk

Copy link
Copy Markdown
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

@andrewbranch andrewbranch left a comment

Copy link
Copy Markdown
Member

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)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.