Skip to content

Extended unicode escapes in identifiers are not parsed #32717

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

Closed
weswigham opened this issue Aug 5, 2019 · 3 comments
Closed

Extended unicode escapes in identifiers are not parsed #32717

weswigham opened this issue Aug 5, 2019 · 3 comments
Labels
Bug A bug in TypeScript

Comments

@weswigham
Copy link
Member

weswigham commented Aug 5, 2019

TypeScript Version: 3.4.0-dev.201xxxxx

Search Terms:

Code

const x\u{0061} = 12;

Expected behavior:
No error

Actual behavior:
Many errors.

Playground Link:

IdentifierPart is defined to accept \UnicodeEscapeSequence which is defined as both normal and extended unicode escapes - right now we only handle normal (\u0061) and not extended (\u{0061}) escapes.

@weswigham
Copy link
Member Author

cc @rbuckton is this just an oversight in our scanIdentifierParts function? Or perhaps a more recent change to ecma262?

@weswigham weswigham added the Bug A bug in TypeScript label Aug 5, 2019
@ajafff
Copy link
Contributor

ajafff commented Aug 5, 2019

duplicate of #5291?

@weswigham
Copy link
Member Author

So it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants