vmware-archive / scripted

The Scripted code editor
Eclipse Public License 1.0
1.56k stars 166 forks source link

Navigation to definition problem #221

Closed aeisenberg closed 11 years ago

aeisenberg commented 11 years ago

Originally reported in #220. The following snippet, I would expect to be able to navigate from the _init reference to its definition in the prototype:

function TextView (options) {
    this._init(options);
}

TextView.prototype = {
    _init: function(options) { }

};
aeisenberg commented 11 years ago

Also, this should work as well, but doesn't:

function TextView (options) {
    this._init(options);
}

TextView.prototype._init = function(options) { };
aeisenberg commented 11 years ago

Messy, but fixed. This problem comes about by how we defer inferring certain parts of the file until after all other parts of the file are inferred. We were originally deferring inferring the entire function that contains the offset of interest. But we should have been deferring just the function body. This was we get to have a stable type for the function..