Skip to content

Bug with trying to access an object field starting with underscore #6341

Closed
@DZakh

Description

@DZakh

https://rescript-lang.org/try?version=v10.1.2&code=DYUwLgBAZg9jEF4IENED4IG8BQEUG0AiAfQAZCBdbAX2yA

This

let foo = a => {
  a["_0"]
}

is compiled to

function foo(a) {
  return a[0];
}

instead of

function foo(a) {
  return a["_0"];
}

Reproduced in v11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions