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

LiteralPropertyName should allow BigIntLiteral #10955

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 3, 2020

Q                       A
Fixed Issues? LiteralPropertyName does not allow BigIntLiteral
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

Tracing through the spec:

LiteralPropertyName => NumericLiteral => DecimalBigIntegerLiteral
LiteralPropertyName => NumericLiteral => NonDecimalIntegerLiteral BigIntLiteralSuffix

Related:
tc39/test262#2457
https://bugs.chromium.org/p/v8/issues/detail?id=10083

CI is red due to

@JLHwung JLHwung added PR: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: BigInt pkg: parser labels Jan 3, 2020
@nicolo-ribaudo
Copy link
Member

You can run make test-typescript-update-whitelist

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

FWIW, I don't like this 🙃

@JLHwung
Copy link
Contributor Author

JLHwung commented Jan 4, 2020

Yeah we can always revert the whitelist when TypeScript fixed this issue.

@nicolo-ribaudo
Copy link
Member

Oh, I meant the fact that JS allows bigints as property names 😂

@JLHwung
Copy link
Contributor Author

JLHwung commented Jan 4, 2020

@nicolo-ribaudo Well it has been staged 4, so 🤷‍♂️

Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

Huh, yeah, curious what the reasoning behind allowing this is. I guess since BigInts can already be values, it's not really making it harder to serialize objects.

@JLHwung JLHwung merged commit 8fd532d into babel:master Jan 7, 2020
@JLHwung JLHwung deleted the property-name-should-allow-bigint-literal branch January 7, 2020 15:23
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 8, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: BigInt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants