Maheshjayachandran / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Closure Library will not compile with shadow var checking turned on #399

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Turn on shadow var checking to CheckLevel.ERROR
2. Compile Closure

What is the expected output? What do you see instead?

/usr/local/users/bmccann/closure/closure-library/closure/goog/array/array.js:317
: ERROR - Highly error prone shadowing of variable name val.Consider using a 
different local variable name.
  goog.array.forEach(arr, function(val, index) {
                                   ^

/usr/local/users/bmccann/closure/closure-library/closure/goog/array/array.js:356
: ERROR - Highly error prone shadowing of variable name val.Consider using a 
different local variable name.
  goog.array.forEachRight(arr, function(val, index) {
                                        ^

/usr/local/users/bmccann/closure/closure-library/closure/goog/base.js:542: 
ERROR - Highly error prone shadowing of variable name path.Consider using a 
different local variable name.
    function visitNode(path) {
                       ^

/usr/local/users/bmccann/closure/closure-library/closure/goog/events/events.js:5
32: ERROR - Highly error prone shadowing of variable name i.Consider using a 
different local variable name.
      for (var i = listeners.length - 1; i >= 0; i--) {
               ^

/usr/local/users/bmccann/closure/closure-library/closure/goog/events/events.js:5
33: ERROR - Highly error prone shadowing of variable name listener.Consider 
using a different local variable name.
        var listener = listeners[i];
            ^

5 error(s), 0 warning(s)

What version of the product are you using? On what operating system?

At revision 1441.

Original issue reported on code.google.com by benjamin...@gmail.com on 3 Dec 2011 at 7:51

GoogleCodeExporter commented 9 years ago
Everyone agreed that this warning is dumb. it has been removed.

Original comment by Nicholas.J.Santos on 4 Dec 2011 at 2:45