Skip to content

Exotic identifiers as field names broken on master #6882

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
cknitt opened this issue Jul 16, 2024 · 2 comments · Fixed by #6897
Closed

Exotic identifiers as field names broken on master #6882

cknitt opened this issue Jul 16, 2024 · 2 comments · Fixed by #6897
Labels

Comments

@cknitt
Copy link
Member

cknitt commented Jul 16, 2024

type test = {\"TEST": int}

let test = {\"TEST": 42}

now compiles to

let test = {
  "\\\"TEST\"": 42
};

instead of

let test = {
  TEST: 42
};

@cometkim Could this be a side effect of #6777/#6779?

@cometkim
Copy link
Member

Hmmm, would they be represented as Lident in the AST?

@cometkim
Copy link
Member

cometkim commented Jul 16, 2024

Ok let me check it. I think we need to modify the parser then It's the backend (Js_dump)

@cknitt cknitt added the bug label Jul 18, 2024
cometkim added a commit to cometkim/rescript that referenced this issue Jul 20, 2024
cknitt pushed a commit that referenced this issue Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants