This should be a SyntaxError: var thi\u0073; Currently we permit it and actually declare a variable named "this" (although we ban it in strict mode, apparently by accident rather than by design). See discussion here: https://mail.mozilla.org/pipermail/es-discuss/2011-June/015389.html The most persuasive response was Allen Wirfs-Brock's interpretation of ES5: https://mail.mozilla.org/pipermail/es-discuss/2011-June/015422.html No one really disagreed.
Created attachment 567474 [details] [diff] [review] v1 detect unicode escaped keywords
Comment on attachment 567474 [details] [diff] [review] v1 detect unicode escaped keywords throws() has a bug: if eval(code) does not throw, the test passes. r=me with that fixed. Thanks!
6 years ago