On Mar 17, 2010, at 1:54 PM, j...@google.com wrote:
It's completely a style thing. Closure Compiler's externs files only allow printInt to take two parameters. This code wouldn't be able to trigger the
incorrect behavior as far as I know.

Ok, LGTM, though perhaps file a bug against Closure Compiler to remove a
restriction that may not be accurate.

The restriction's accurate - not providing a base can be buggy, and has different behavior depending on the browser (such as whether 08 is 8 or 0). Calling parseInt() without a base is banned in Google's JavaScript, and similarly counts as an error in Closure Compiler. See the es3.js externs file for the words "strictly banned":

http://code.google.com/p/closure-compiler/source/browse/trunk/externs/es3.js

and this thread on the Closure Compiler open source list for another one of the discussions on the topic.

http://code.google.com/p/closure-compiler/issues/detail?id=111

Robert

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to