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 217011 - Wrong context of nested function
Summary: Wrong context of nested function
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-17 09:07 UTC by Vladimir Riha
Modified: 2012-12-20 08:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (7.84 KB, image/png)
2012-08-17 09:07 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-08-17 09:07:04 UTC
Created attachment 123238 [details]
screenshot

Try following:

var Player = function(){
    this.name = "better player";
    this.b = new Bar();
    
    function Bar(){
      this.tp =1;  
    };
    
}

var a = new Player();


Now navigator show property "tp" as if it belongs to Player, which is incorrect (see screenshot)


Product Version: NetBeans IDE Dev (Build EaselCSS-512-on-20120816)
Java: 1.7.0_06; Java HotSpot(TM) Client VM 23.2-b09
System: Linux version 3.2.0-29-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2012-08-17 09:08:53 UTC
This is probably related:
- if you invoke completion for "a." then "tp" is listed (wrong) and for "a.b." the "tp" is not listed (wrong)
Comment 2 Petr Hejl 2012-09-19 13:45:44 UTC
Still valid.
Comment 3 Petr Pisl 2012-12-19 12:07:16 UTC
Fixed in the webmain: http://hg.netbeans.org/web-main/rev/7d46dec29a6a
Comment 4 Quality Engineering 2012-12-20 02:47:07 UTC
Integrated into 'main-golden', will be available in build *201212200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7d46dec29a6a
User: Petr Pisl <ppisl@netbeans.org>
Log: #217011 - Wrong context of nested function
Comment 5 Vladimir Riha 2012-12-20 08:34:19 UTC
Thanks, issue with Navigator is fixed, but code completion for Player offers tp property, I created separate issue 224071 for this.


Product Version: NetBeans IDE Dev (Build web-main-9571-on-20121219)
Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18
System: Linux version 3.2.0-34-generic-pae running on i386; UTF-8; en_US (nb)