Community
Participate
Working Groups
Build Identifier: 20110615-0604 JSDT Version: 1.3.0.v201103031824-7F78FXPFBBoPbXRIcIgs0z0 When a local variable is declared with the same name as a variable in the global scope, the local variable should shadow the global one. That is, the identifier should resolve to the local variable instead of the global one as long as it remains in scope. When the global being shadowed is provided by one of the built-in libraries JSDT shows a "The local variable <identifier> is never used" warning on the local variable's declaration. The hover displayed for references to the local variable displays the documentation for the global instead. I've tested this with Global.NaN from the ECMAScript Built-In Library and window.parent from the ECMA 3 Browser Support library. Both behave incorrectly. Globals declared in project code seem to be shadowed correctly. Reproducible: Always Steps to Reproduce: 1. Create a local variable with the same name as a global provided by one of the built-in libraries. For example: function testfunc () { var parent = {}; parent.test = 'test'; }