coffeescript icon indicating copy to clipboard operation
coffeescript copied to clipboard

Bug: Re-ordered nested non-end BindingRestElement doesn't get transpiled

Open STRd6 opened this issue 2 years ago • 1 comments

Input Code

https://coffeescript.org/#try:(%7Ba%2C%20b...%2C%20c%3A%20%5Bd%2C%20...e%2C%20f%5D%7D)%20-%3E%0A%20%20x%0A

({a, b..., c: [d, ...e, f]}) ->

Expected Behavior

var splice = [].splice;
function({a, c: [d, ...e], ...b}) {
  var f;
  [f] = splice.call(e, -1)
}

Current Behavior

(function({
    a,
    c: [d, ...e, f],
    ...b
  }) {});

Possible Solution

Context

Environment

  • CoffeeScript version: 2.7.0
  • Node.js version:

STRd6 avatar Dec 02 '22 00:12 STRd6

@ljluestc Are you a bot?

STRd6 avatar Sep 09 '23 19:09 STRd6