@@ -18110,18 +18110,17 @@ namespace ts {
18110
18110
18111
18111
forEach(overloads, o => {
18112
18112
const deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags;
18113
- const name = getNameOfDeclaration(o);
18114
18113
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);
18116
18115
}
18117
18116
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);
18119
18118
}
18120
18119
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);
18122
18121
}
18123
18122
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);
18125
18124
}
18126
18125
});
18127
18126
}
@@ -20317,19 +20316,12 @@ namespace ts {
20317
20316
return;
20318
20317
}
20319
20318
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
- }
20329
20319
// 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;
20331
20322
if (propDeclaration &&
20332
- (getNameOfDeclaration(propDeclaration).kind === SyntaxKind.ComputedPropertyName ||
20323
+ (propDeclaration.kind === SyntaxKind.BinaryExpression ||
20324
+ getNameOfDeclaration(propDeclaration).kind === SyntaxKind.ComputedPropertyName ||
20333
20325
prop.parent === containingType.symbol)) {
20334
20326
errorNode = propDeclaration;
20335
20327
}
0 commit comments