diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 602e4ccc12c..f3e4cefa919 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2079,7 +2079,9 @@ module ts { // Now we emit the expressions forEach(node.templateSpans, templateSpan => { write(", "); - emit(templateSpan.expression); + var needsParens = templateSpan.expression.kind === SyntaxKind.BinaryExpression + && ( templateSpan.expression).operator === SyntaxKind.CommaToken; + emitParenthesized(templateSpan.expression, needsParens); }); return; }