Skip to content
New issue

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

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

Already on GitHub? # to your account

Extended unicode escapes in identifiers are not parsed #32717

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.

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

No branches or pull requests

2 participants