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.
Please try this in JS file: /** * * @returns {Runner} */ function test() { var b = new Runner(); return b; } var a = test(); function Runner(object, name, dispose) { this.name = name; this.notify = function() { }; } => Navigator shows that test() returns either Runner or windows.test.b and the same goes for type of "a" variable Product Version: NetBeans IDE Dev (Build 201308150051) Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Vlado I see in navigator that the test() function and a variable is the type Runner. I have created test for it: http://hg.netbeans.org/web-main/rev/2bf263ca0dc8 and the structure file is: http://hg.netbeans.org/web-main/file/2bf263ca0dc8/javascript2.editor/test/unit/data/testfiles/structure/issue234453.js.structure
If you see something different, let me know.
Integrated into 'main-silver', will be available in build *201308152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2bf263ca0dc8 User: Petr Pisl <ppisl@netbeans.org> Log: #234453 - Navigator indicates wrong type of returned variable
I'm sorry, it depends on having some JS library in project (I'll attach the project to reproduce it). The library also defines global function test() without return value. But please notice that in file newjavascript.js, type of variable v is either Runner or windows.test.c (so both of this types comes from test() in newjavascript.js file, not from the one in folder qunit). So the type of variable v should be Runner|undefined ?
Created attachment 138774 [details] sample project
I see the problem is that there is defined in project windows.test object.
Still reproducible.