@@ -13257,13 +13257,16 @@ namespace ts {
13257
13257
case SyntaxKind.Identifier:
13258
13258
case SyntaxKind.StringLiteral:
13259
13259
case SyntaxKind.RegularExpressionLiteral:
13260
+ case SyntaxKind.TaggedTemplateExpression:
13261
+ case SyntaxKind.TemplateExpression:
13260
13262
case SyntaxKind.NoSubstitutionTemplateLiteral:
13261
13263
case SyntaxKind.NumericLiteral:
13262
13264
case SyntaxKind.TrueKeyword:
13263
13265
case SyntaxKind.FalseKeyword:
13264
13266
case SyntaxKind.NullKeyword:
13265
13267
case SyntaxKind.UndefinedKeyword:
13266
13268
case SyntaxKind.FunctionExpression:
13269
+ case SyntaxKind.ClassExpression:
13267
13270
case SyntaxKind.ArrowFunction:
13268
13271
case SyntaxKind.ArrayLiteralExpression:
13269
13272
case SyntaxKind.ObjectLiteralExpression:
@@ -13465,7 +13468,7 @@ namespace ts {
13465
13468
checkAssignmentOperator(rightType);
13466
13469
return getRegularTypeOfObjectLiteral(rightType);
13467
13470
case SyntaxKind.CommaToken:
13468
- if (isSideEffectFree(left) && !compilerOptions.allowUnreachableCode) {
13471
+ if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) ) {
13469
13472
error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
13470
13473
}
13471
13474
return rightType;
0 commit comments