Skip to content
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

Salsa does not highlight object properties across methods #6664

Closed
egamma opened this issue Jan 27, 2016 · 3 comments
Closed

Salsa does not highlight object properties across methods #6664

egamma opened this issue Jan 27, 2016 · 3 comments
Labels
Fixed A PR has been merged for this issue

Comments

@egamma
Copy link
Member

egamma commented Jan 27, 2016

From @alexandrudima on January 27, 2016 12:46

Testing #2218

When I hover over this.age in the console.log I get to see it is a property of type number, but the assignment in line 2 is not highlighted:

function Person() {
    this.age = 13;
}
Person.prototype.sayHi = function() {
    console.log('Hi, I\'m ' + this.age);
    console.log('Hi, I\'m ' + this.age);
}

var p1 = new Person();

image

Copied from original issue: microsoft/vscode#2438

@billti
Copy link
Member

billti commented Jan 27, 2016

We need to do something here. Seems busted that we highlight a bunch of use sites, but not the declaration.

That said, this is JavaScript, and in a bunch of cases, we are not going to locate references based on type. There are some heuristics we could use, but its always going to be wrong in some cases. We should decide how broken we are happy to live with, if at all.

@billti billti assigned RyanCavanaugh and unassigned egamma Jan 27, 2016
@zhengbli
Copy link
Contributor

This is actually the same with the find all references bug, that getSymbolAtLocation didn't return the declaration at the this.^age= position. This should be fixed also by #6632

@zhengbli zhengbli assigned zhengbli and unassigned RyanCavanaugh Jan 27, 2016
@zhengbli zhengbli added the Fixed A PR has been merged for this issue label Jan 28, 2016
@alexdima
Copy link
Member

Awesome! 👍

@mhegazy mhegazy modified the milestones: Salsa 0.9, TypeScript 1.8.2 Feb 2, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

6 participants