Skip to content

Lexer: Incorrect JS generated for function called with an object with a conditional property #2051

@barshow

Description

@barshow

working

alert
  val: "hello"
  val2: "all good"
  val3: "works" if true

compiles correctly to

alert({
  val: "hello",
  val2: "all good",
  val3: true ? "works" : void 0
});

incorrect compilation

alert
  val3: "works" if true
  val: "hello"
  val2: "all good"

compiles incorrectly to

alert(true ? {
  val3: "works"
} : void 0, {
  val: "hello",
  val2: "all good"
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions