Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage: property names which are keywords containing escape sequences are allowed #2286

Closed
bakkot opened this issue Aug 12, 2019 · 1 comment

Comments

@bakkot
Copy link
Contributor

commented Aug 12, 2019

From IRC:

({ def\u0061ult: 0 });

and

({ def\u{61}ult: 0 });

are both legal, since def\u0061ult and def\u{61}ult are both IdentifierNames and therefore LiteralPropertyNames. The restriction on keywords not containing escape sequences - which prevents export def\u0061ult function (){} from being legal - is not relevant in this context.

This case appears not to be covered by current tests - at least, I couldn't find one at a quick glance.

Currently, out of Chakra, JavascriptCore, SpiderMonkey, V8, and XS, only Chakra and SpiderMonkey allow the first form, and only SpiderMonkey allows the second.

@bakkot

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

Closing as a duplicate of #2285.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.