-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IDE] Fix rename with shorthand named imports
Summary: This is a quick fix for a bug in the implementation of the LSP renaming action. Previously, it didn't check for whether a named import was actually making use of the shorthand syntax. It erronously expanded the identifier to be `oldName as newName` even when `oldName` was already a local name. I also changed the name of the type to `shorthandKind` to make it clear this refers to a shorthand of either an object or an import. Changelog: [internal] Reviewed By: mroch Differential Revision: D43704868 (f6ddb95) ------------------------------------------------------------------------ (from 144c8b075c5d77083f456cbe48a2019b012a4959) fbshipit-source-id: ff215adc6c2d3b331da2e59648a8841b69583ea8
- Loading branch information
1 parent
b8531a1
commit 0ff8bb8
Showing
4 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"character": 30 | ||
} | ||
}, | ||
"newText": "wutLocal as NEW_NAME" | ||
"newText": "NEW_NAME" | ||
}, | ||
{ | ||
"range": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters