Bug 333714 - [content assist] Classes are not properly scoped
Summary: [content assist] Classes are not properly scoped
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-06 19:13 EST by Eugene Ostroukhov CLA
Modified: 2013-06-19 11:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Ostroukhov CLA 2011-01-06 19:13:09 EST
1. (Expected behavior) I do not have "myfunction()" function visible in the global scope code assist if I write it in anonymous scope:
(function() {
    function myfunction() {
        return 1;
    }
})();

2. (Wrong behavior) I will see "myfunction" class (and its property) in code assist if I change the code to:
(function() {
    function myfunction() {
        this.aproperty = 1;
    }
})();

Note: browser does not see this class in the global scope.