File tree 3 files changed +29
-1
lines changed
3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -20930,7 +20930,9 @@ namespace ts {
20930
20930
return getSymbolOfNode(entityName.parent);
20931
20931
}
20932
20932
20933
- if (isInJavaScriptFile(entityName) && entityName.parent.kind === SyntaxKind.PropertyAccessExpression) {
20933
+ if (isInJavaScriptFile(entityName) &&
20934
+ entityName.parent.kind === SyntaxKind.PropertyAccessExpression &&
20935
+ entityName.parent === (entityName.parent.parent as BinaryExpression).left) {
20934
20936
// Check if this is a special property assignment
20935
20937
const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName);
20936
20938
if (specialPropertyAssignmentSymbol) {
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts"/>
2
+ // @allowJs : true
3
+ // @Filename : a.js
4
+ ////const foo = {
5
+ //// set: function (x) {
6
+ //// this._x = x;
7
+ //// },
8
+ //// copy: function ([|x|]) {
9
+ //// this._x = /**/[|x|].prop;
10
+ //// }
11
+ //// };
12
+ goTo . marker ( ) ;
13
+ verify . renameLocations ( /*findInStrings*/ false , /*findInComments*/ false ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts"/>
2
+ // @allowJs : true
3
+ // @Filename : a.js
4
+ ////const foo = {
5
+ //// set: function (x) {
6
+ //// this._x = x;
7
+ //// },
8
+ //// copy: function (/**/[|x|]) {
9
+ //// this._x = [|x|].prop;
10
+ //// }
11
+ //// };
12
+ goTo . marker ( ) ;
13
+ verify . renameLocations ( /*findInStrings*/ false , /*findInComments*/ false ) ;
You can’t perform that action at this time.
0 commit comments