@@ -18110,18 +18110,17 @@ namespace ts {
1811018110
1811118111 forEach(overloads, o => {
1811218112 const deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags;
18113- const name = getNameOfDeclaration(o);
1811418113 if (deviation & ModifierFlags.Export) {
18115- error(name , Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
18114+ error(getNameOfDeclaration(o) , Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
1811618115 }
1811718116 else if (deviation & ModifierFlags.Ambient) {
18118- error(name , Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
18117+ error(getNameOfDeclaration(o) , Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
1811918118 }
1812018119 else if (deviation & (ModifierFlags.Private | ModifierFlags.Protected)) {
18121- error(name || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
18120+ error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
1812218121 }
1812318122 else if (deviation & ModifierFlags.Abstract) {
18124- error(name , Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
18123+ error(getNameOfDeclaration(o) , Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
1812518124 }
1812618125 });
1812718126 }
@@ -20317,19 +20316,12 @@ namespace ts {
2031720316 return;
2031820317 }
2031920318
20320- let errorNode: Node;
20321- if (propDeclaration && propDeclaration.kind === SyntaxKind.BinaryExpression) {
20322- const specialAssignmentKind = getSpecialPropertyAssignmentKind(propDeclaration as BinaryExpression);
20323- if (specialAssignmentKind === SpecialPropertyAssignmentKind.Property ||
20324- specialAssignmentKind === SpecialPropertyAssignmentKind.PrototypeProperty ||
20325- specialAssignmentKind === SpecialPropertyAssignmentKind.ThisProperty) {
20326- errorNode = propDeclaration;
20327- }
20328- }
2032920319 // perform property check if property or indexer is declared in 'type'
20330- // this allows to rule out cases when both property and indexer are inherited from the base class
20320+ // this allows us to rule out cases when both property and indexer are inherited from the base class
20321+ let errorNode: Node;
2033120322 if (propDeclaration &&
20332- (getNameOfDeclaration(propDeclaration).kind === SyntaxKind.ComputedPropertyName ||
20323+ (propDeclaration.kind === SyntaxKind.BinaryExpression ||
20324+ getNameOfDeclaration(propDeclaration).kind === SyntaxKind.ComputedPropertyName ||
2033320325 prop.parent === containingType.symbol)) {
2033420326 errorNode = propDeclaration;
2033520327 }
0 commit comments