This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246299 - Go to declaration doesn't work in some cases
Summary: Go to declaration doesn't work in some cases
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-06 11:10 UTC by Petr Pisl
Modified: 2017-07-11 11:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2014-08-06 11:10:44 UTC
Have a code:

var myModule = function()
{
    return {
        foo: function()
        {
            console.log("foo");
        },
        bar: "bar"
    };
};

myModule().bar;
myModule().foo();

var yourModule = myModule();
yourModule.bar;
yourModule.foo();

Navigation from myModule().bar and myModule.foo doesn't work, but the navigation from yourModule.bar and yourModule.foo() works correctly.
Comment 1 Reema 2017-07-11 11:25:38 UTC
Investigated this, it's likely an issue with the way Model is created. Here myModule() invoke call is never getting resolved, as it is not appearing under top fileObject function's properties. We resolve the properties and arguments recursively for Model objects. 'yourModule' is one of the properties under top fileObject function, so it is resolved and occurence is getting added to the anonymous object in myModule function.