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

Add test that noctal escapes are forbidden in strings in strict code #1063

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Jun 19, 2017

Fixes #1062.

type: SyntaxError
---*/

'\08';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very particular case, banned because \0 has a no decimal digit lookahead, in combination with how it would've been handled as a legacy octal literal because 8 isn't an octal digit (right?). Maybe it'd be worth adding another test that's a little more normal, such as \12.

Copy link
Contributor Author

@bakkot bakkot Jun 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@littledan Right. But the more normal cases are already covered here and here. Or was there something not covered by those two + this one you thought ought to be tested?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, LGTM.

@rwaldron rwaldron merged commit 8fe11a6 into tc39:master Jun 21, 2017
@bakkot bakkot deleted the noctal-string branch June 21, 2017 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants