Skip to content

Commit 6a6c03b

Browse files
committed
Fix error message wording
1 parent 2d16474 commit 6a6c03b

21 files changed

+45
-45
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8999,7 +8999,7 @@ module ts {
89998999
var typeName1 = typeToString(existing.containingType);
90009000
var typeName2 = typeToString(base);
90019001

9002-
var errorInfo = chainDiagnosticMessages(undefined, Diagnostics.Named_properties_0_of_types_1_and_2_are_not_identical, prop.name, typeName1, typeName2);
9002+
var errorInfo = chainDiagnosticMessages(undefined, Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, prop.name, typeName1, typeName2);
90039003
errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2);
90049004
diagnostics.add(createDiagnosticForNodeFromMessageChain(typeNode, errorInfo));
90059005
}

src/compiler/diagnosticInformationMap.generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ module ts {
167167
Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." },
168168
Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." },
169169
Cannot_find_global_type_0: { code: 2318, category: DiagnosticCategory.Error, key: "Cannot find global type '{0}'." },
170-
Named_properties_0_of_types_1_and_2_are_not_identical: { code: 2319, category: DiagnosticCategory.Error, key: "Named properties '{0}' of types '{1}' and '{2}' are not identical." },
170+
Named_property_0_of_types_1_and_2_are_not_identical: { code: 2319, category: DiagnosticCategory.Error, key: "Named property '{0}' of types '{1}' and '{2}' are not identical." },
171171
Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." },
172172
Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
173173
Type_0_is_not_assignable_to_type_1: { code: 2322, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@
661661
"category": "Error",
662662
"code": 2318
663663
},
664-
"Named properties '{0}' of types '{1}' and '{2}' are not identical.": {
664+
"Named property '{0}' of types '{1}' and '{2}' are not identical.": {
665665
"category": "Error",
666666
"code": 2319
667667
},

tests/baselines/reference/baseTypePrivateMemberClash.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'.
2-
Named properties 'm' of types 'X' and 'Y' are not identical.
2+
Named property 'm' of types 'X' and 'Y' are not identical.
33

44

55
==== tests/cases/compiler/baseTypePrivateMemberClash.ts (1 errors) ====
@@ -13,4 +13,4 @@ tests/cases/compiler/baseTypePrivateMemberClash.ts(8,11): error TS2320: Interfac
1313
interface Z extends X, Y { }
1414
~
1515
!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y'.
16-
!!! error TS2320: Named properties 'm' of types 'X' and 'Y' are not identical.
16+
!!! error TS2320: Named property 'm' of types 'X' and 'Y' are not identical.

tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(8,11): error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>'.
2-
Named properties 'foo' of types 'I<number>' and 'I<string>' are not identical.
2+
Named property 'foo' of types 'I<number>' and 'I<string>' are not identical.
33
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesThatDifferOnlyByReturnType2.ts(13,16): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
44

55

@@ -14,7 +14,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesTha
1414
interface A extends I<number>, I<string> { }
1515
~
1616
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I<number>' and 'I<string>'.
17-
!!! error TS2320: Named properties 'foo' of types 'I<number>' and 'I<string>' are not identical.
17+
!!! error TS2320: Named property 'foo' of types 'I<number>' and 'I<string>' are not identical.
1818

1919
var x: A;
2020
// BUG 822524

tests/baselines/reference/conflictingMemberTypesInBases.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'.
2-
Named properties 'm' of types 'B' and 'D' are not identical.
2+
Named property 'm' of types 'B' and 'D' are not identical.
33

44

55
==== tests/cases/compiler/conflictingMemberTypesInBases.ts (1 errors) ====
@@ -17,6 +17,6 @@ tests/cases/compiler/conflictingMemberTypesInBases.ts(12,11): error TS2320: Inte
1717
interface E extends B { } // Error here for extending B and D
1818
~
1919
!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D'.
20-
!!! error TS2320: Named properties 'm' of types 'B' and 'D' are not identical.
20+
!!! error TS2320: Named property 'm' of types 'B' and 'D' are not identical.
2121
interface E extends D { } // No duplicate error here
2222

tests/baselines/reference/genericAndNonGenericInheritedSignature1.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/genericAndNonGenericInheritedSignature1.ts(7,11): error TS2320: Interface 'Hello' cannot simultaneously extend types 'Foo' and 'Bar'.
2-
Named properties 'f' of types 'Foo' and 'Bar' are not identical.
2+
Named property 'f' of types 'Foo' and 'Bar' are not identical.
33

44

55
==== tests/cases/compiler/genericAndNonGenericInheritedSignature1.ts (1 errors) ====
@@ -12,6 +12,6 @@ tests/cases/compiler/genericAndNonGenericInheritedSignature1.ts(7,11): error TS2
1212
interface Hello extends Foo, Bar {
1313
~~~~~
1414
!!! error TS2320: Interface 'Hello' cannot simultaneously extend types 'Foo' and 'Bar'.
15-
!!! error TS2320: Named properties 'f' of types 'Foo' and 'Bar' are not identical.
15+
!!! error TS2320: Named property 'f' of types 'Foo' and 'Bar' are not identical.
1616
}
1717

tests/baselines/reference/genericAndNonGenericInheritedSignature2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/genericAndNonGenericInheritedSignature2.ts(7,11): error TS2320: Interface 'Hello' cannot simultaneously extend types 'Bar' and 'Foo'.
2-
Named properties 'f' of types 'Bar' and 'Foo' are not identical.
2+
Named property 'f' of types 'Bar' and 'Foo' are not identical.
33

44

55
==== tests/cases/compiler/genericAndNonGenericInheritedSignature2.ts (1 errors) ====
@@ -12,6 +12,6 @@ tests/cases/compiler/genericAndNonGenericInheritedSignature2.ts(7,11): error TS2
1212
interface Hello extends Bar, Foo {
1313
~~~~~
1414
!!! error TS2320: Interface 'Hello' cannot simultaneously extend types 'Bar' and 'Foo'.
15-
!!! error TS2320: Named properties 'f' of types 'Bar' and 'Foo' are not identical.
15+
!!! error TS2320: Named property 'f' of types 'Bar' and 'Foo' are not identical.
1616
}
1717

tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'.
2-
Named properties 'x' of types 'C' and 'C2' are not identical.
2+
Named property 'x' of types 'C' and 'C2' are not identical.
33

44

55
==== tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts (1 errors) ====
@@ -14,6 +14,6 @@ tests/cases/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.ts(9,1
1414
interface A extends C, C2 { // error
1515
~
1616
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'.
17-
!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical.
17+
!!! error TS2320: Named property 'x' of types 'C' and 'C2' are not identical.
1818
y: string;
1919
}

tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts(9,11): error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'.
2-
Named properties 'x' of types 'C' and 'C2' are not identical.
2+
Named property 'x' of types 'C' and 'C2' are not identical.
33

44

55
==== tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts (1 errors) ====
@@ -14,6 +14,6 @@ tests/cases/compiler/inheritSameNamePropertiesWithDifferentOptionality.ts(9,11):
1414
interface A extends C, C2 { // error
1515
~
1616
!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2'.
17-
!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical.
17+
!!! error TS2320: Named property 'x' of types 'C' and 'C2' are not identical.
1818
y: string;
1919
}

0 commit comments

Comments
 (0)