3 ms·
If the Closure "compiler" changes the behavior of a program, that means it's generating incorrect code. Can you give an example?
by gruseom 17y ago
If the Closure "compiler" changes the behavior of a program, that means it's generating incorrect code. Can you give an example?
- seiji 17y agoCheck out http://code.google.com/closure/compiler/docs/api-tutorial3.html#propnames http://code.google.com/closure/compiler/docs/api-tutorial3.h... (short version: inconsistencies between Closure renaming my_object.attribute to a minified a.a while in other places you use my_object['attribute'] which it can't minify to be a.a. You end up with a.a = 3 and a['attribute'] = {something else}).
- gruseom 17y agoAh. This is a classic problem with transforming JS. We've run into something similar with Parenscript (but were able to correct it, rather than say "just don't write code that does X").