Skip to content

Commit

Permalink
Fix compiler issues revealed by increased intersection correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Feb 8, 2020
1 parent eaf872c commit 94353d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/compiler/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1795,9 +1795,7 @@ namespace ts {

const target = getTargetOfBindingOrAssignmentElement(bindingElement);
if (target && isPropertyName(target)) {
return isComputedPropertyName(target) && isStringOrNumericLiteral(target.expression)
? target.expression
: target;
return target;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/compiler/transformers/classFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ namespace ts {
);
}

function visitArrayAssignmentTarget(node: AssignmentPattern) {
function visitArrayAssignmentTarget(node: BindingOrAssignmentElement) {
const target = getTargetOfBindingOrAssignmentElement(node);
if (target && isPrivateIdentifierPropertyAccessExpression(target)) {
const wrapped = wrapPrivateIdentifierForDestructuringTarget(target);
Expand Down

0 comments on commit 94353d2

Please sign in to comment.