According to the latest draft, it is allowed to express a ReservedWord using 
Unicode Escape Sequences:
> The ReservedWord definitions are specified as literal sequences of specific 
> SourceCharacter elements. However,
any code point in a ReservedWord can also be expressed by a \ 
UnicodeEscapeSequence that expresses that
same Unicode code point. Use of such escape sequences does not change the 
meaning of the ReservedWord.
Because of the last sentence the following should now give an error on all of 
the implementations:
```
var v\u0061r = 1 ; //err
```
However, if my understanding is correct, it will also enable the following 
usage:
```
v\u0061r x = 1 ; //works
```
The second example was also previously mentioned in the [bug 
277](https://bugs.ecmascript.org/show_bug.cgi?id=277) but there's no clear 
resolution to it. Is the second example expected to work or are we just 
disallowing unicode escape sequenced keywords in identifier position?
Thanks,
Murat
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to