diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 7a6aaa18618..7f2b36ff7d4 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -837,8 +837,9 @@ namespace ts { function isNarrowableReference(expr: Expression): boolean { return expr.kind === SyntaxKind.Identifier || expr.kind === SyntaxKind.ThisKeyword || expr.kind === SyntaxKind.SuperKeyword || (isPropertyAccessExpression(expr) || isNonNullExpression(expr) || isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - isElementAccessExpression(expr) && isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || - isAssignmentExpression(expr) && isNarrowableReference(expr.left); + isElementAccessExpression(expr) && isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression); + // || + // isAssignmentExpression(expr) && isNarrowableReference(expr.left); } function containsNarrowableReference(expr: Expression): boolean { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index badc8a5ed9b..d386adc352d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -20131,11 +20131,11 @@ namespace ts { case SyntaxKind.ParenthesizedExpression: case SyntaxKind.NonNullExpression: return isMatchingReference(source, (target as NonNullExpression | ParenthesizedExpression).expression); - case SyntaxKind.BinaryExpression: - if (isAssignmentExpression(target)) { - return isMatchingReference(source, target.left); - } - break; + // case SyntaxKind.BinaryExpression: + // if (isAssignmentExpression(target)) { + // return isMatchingReference(source, target.left); + // } + // break; } switch (source.kind) { case SyntaxKind.Identifier: