ternjs / tern

A JavaScript code analyzer for deep, cross-editor language support
https://ternjs.net/
MIT License
4.25k stars 378 forks source link

Rename command renames Object property with same name #1007

Closed Cyperwu closed 5 years ago

Cyperwu commented 5 years ago

I tried the live demo with such code:

var a = 'foo'
var b = { a: 'bar' }

function c() {
  var d = a + b.a
  return d
}

c()

rename a with foo and the code becomes

var foo = 'foo'
var b = { a: 'bar' }

function c() {
  var d = foo + b.foo
  return d
}

c()