@@ -1366,7 +1366,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13661366 return true ;
13671367 }
13681368
1369- function emitListWithSpread ( elements : Expression [ ] , alwaysCopy : boolean , multiLine : boolean , trailingComma : boolean ) {
1369+ function emitListWithSpread ( elements : Expression [ ] , needsUniqueCopy : boolean , multiLine : boolean , trailingComma : boolean ) {
13701370 let pos = 0 ;
13711371 let group = 0 ;
13721372 let length = elements . length ;
@@ -1383,7 +1383,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13831383 e = ( < SpreadElementExpression > e ) . expression ;
13841384 emitParenthesizedIf ( e , /*parenthesized*/ group === 0 && needsParenthesisForPropertyAccessOrInvocation ( e ) ) ;
13851385 pos ++ ;
1386- if ( pos === length && group === 0 && alwaysCopy && e . kind !== SyntaxKind . ArrayLiteralExpression ) {
1386+ if ( pos === length && group === 0 && needsUniqueCopy && e . kind !== SyntaxKind . ArrayLiteralExpression ) {
13871387 write ( ".slice()" ) ;
13881388 }
13891389 }
@@ -1425,7 +1425,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14251425 write ( "]" ) ;
14261426 }
14271427 else {
1428- emitListWithSpread ( elements , /*alwaysCopy */ true , /*multiLine*/ ( node . flags & NodeFlags . MultiLine ) !== 0 ,
1428+ emitListWithSpread ( elements , /*needsUniqueCopy */ true , /*multiLine*/ ( node . flags & NodeFlags . MultiLine ) !== 0 ,
14291429 /*trailingComma*/ elements . hasTrailingComma ) ;
14301430 }
14311431 }
@@ -1850,7 +1850,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
18501850 write ( "void 0" ) ;
18511851 }
18521852 write ( ", " ) ;
1853- emitListWithSpread ( node . arguments , /*alwaysCopy */ false , /*multiLine*/ false , /*trailingComma*/ false ) ;
1853+ emitListWithSpread ( node . arguments , /*needsUniqueCopy */ false , /*multiLine*/ false , /*trailingComma*/ false ) ;
18541854 write ( ")" ) ;
18551855 }
18561856
@@ -1913,7 +1913,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
19131913 write ( ".bind.apply(" ) ;
19141914 emit ( target ) ;
19151915 write ( ", [void 0].concat(" ) ;
1916- emitListWithSpread ( node . arguments , /*alwaysCopy*/ true , /*multiline*/ false , /*trailingComma*/ false ) ;
1916+ emitListWithSpread ( node . arguments , /*needsUniqueCopy*/ false , /*multiline*/ false , /*trailingComma*/ false ) ;
19171917 write ( ")))" ) ;
19181918 write ( "()" ) ;
19191919 }
0 commit comments