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

Bug: Implicit object literals in array split improperly #5330

Open
Inve1951 opened this issue Jul 29, 2020 · 0 comments
Open

Bug: Implicit object literals in array split improperly #5330

Inve1951 opened this issue Jul 29, 2020 · 0 comments

Comments

@Inve1951
Copy link
Contributor

#try

Input Code

a = [
  b1: 1
  b2: 2
, c1: 1
  c2: 2
]

Expected Behavior

var a;

a = [
  {
    b1: 1,
    b2: 2
  },
  {
    c1: 1,
    c2: 2
  }
];

Current Behavior

var a;

a = [
  {
    b1: 1,
    b2: 2
  },
  {
    c1: 1
  },
  {
    c2: 2
  }
];

Context

Fixing this should provide a reasonable alternative to #4952.

Side note: I ran into this issue writing the initial AST tests but never got around to file it (until now).
I felt like having read about this syntax/semantics in an official source like coffeescript.org but was unable to find the reference again.

Environment

  • CoffeeScript version: v2.5.1
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

No branches or pull requests

1 participant