Ticket #2528116 (new defect)
ReporterMathias Bynens |
Opened: 08/1/11 Last modified: 04/16/12 Status: new Type: defect |
Owner Reid Burke |
Target Release: Priority: |
|---|---|---|---|
| Summary: | Reserved words are still valid property names | ||
| Description: | YUI Compressor will error and fail to compress something like: var foo = {};
Even though there’s nothing wrong with it as per ES5. See http://_Sgithub.com/rwldrn/idiomatic.js/issues/5#issuecomment-1664338 for more information. |
||
| Type: | defect | Observed in Version: | 2.4.6 |
| Component: | YUICompressor | Severity: | S2 (high) |
| Assigned To: | Reid Burke | Target Release: | |
| Location: | Priority: | ||
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | |||
| Test Information: | Try to access a property which has a reserved word as its name (note that this is valid JS), e.g. var foo = {};
…or… ({}).default;
YUI Compressor will error when trying to compress this. |
||
Change History
|
Posted: 08/1/11
|
|
Posted: 08/1/11
Also, I made a typo in the description field. I meant:
Not {}.default, of course.
|
|
Posted: 04/16/12
Details here: http://mathiasbynens.be/notes/javascript-properties |
Okay, so the GitHub link with more info got messed up somehow, here it is again: http://mths.be/bck