termi / es6-transpiler

Tomorrow's JavaScript syntax today
Other
216 stars 18 forks source link

Invalid ES5 code when using arrow function and spread operator in function call arguments #43

Closed MartinKolarik closed 10 years ago

MartinKolarik commented 10 years ago

ES6:

function a ( ...args ) {
    return b( () => true, ...args );
}

ES5:

function a ( args ) {
    // ...
    return b.apply( null, [ function () {
        return true
        ]. // missing } before ]
        concat( ITER$0( args ) )
        );
}