You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/tsc.js
+1-2
Original file line number
Diff line number
Diff line change
@@ -2942,7 +2942,7 @@ var ts;
2942
2942
Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, ts.DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."),
2943
2943
A_get_accessor_must_return_a_value: diag(2378, ts.DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."),
2944
2944
Getter_and_setter_accessors_do_not_agree_in_visibility: diag(2379, ts.DiagnosticCategory.Error, "Getter_and_setter_accessors_do_not_agree_in_visibility_2379", "Getter and setter accessors do not agree in visibility."),
2945
-
get_and_set_accessor_must_have_the_same_type_0_but_this_get_accessor_has_the_type_1: diag(2380, ts.DiagnosticCategory.Error, "get_and_set_accessor_must_have_the_same_type_2380", "'get' and 'set' accessor must have the same type '{0}', but this 'get' accessor has the type '{1}'."),
2945
+
get_and_set_accessor_must_have_the_same_type: diag(2380, ts.DiagnosticCategory.Error, "get_and_set_accessor_must_have_the_same_type_2380", "'get' and 'set' accessor must have the same type."),
2946
2946
A_signature_with_an_implementation_cannot_use_a_string_literal_type: diag(2381, ts.DiagnosticCategory.Error, "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381", "A signature with an implementation cannot use a string literal type."),
2947
2947
Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: diag(2382, ts.DiagnosticCategory.Error, "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382", "Specialized overload signature is not assignable to any non-specialized signature."),
2948
2948
Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, ts.DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."),
@@ -3212,7 +3212,6 @@ var ts;
3212
3212
Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, ts.DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."),
3213
3213
Cannot_find_lib_definition_for_0: diag(2726, ts.DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."),
3214
3214
Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, ts.DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"),
3215
-
The_respective_set_accessor_has_the_type_0: diag(2730, ts.DiagnosticCategory.Error, "The_respective_set_accessor_has_the_type_0_2730", "The respective 'set' accessor has the type '{0}'."),
3216
3215
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
3217
3216
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
3218
3217
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
Copy file name to clipboardexpand all lines: tests/baselines/reference/abstractPropertyNegative.errors.txt
+6-4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
tests/cases/compiler/abstractPropertyNegative.ts(10,18): error TS2380: 'get' and 'set' accessor must have the same type.
2
-
tests/cases/compiler/abstractPropertyNegative.ts(11,18): error TS2380: 'get' and 'set' accessor must have the same type.
1
+
tests/cases/compiler/abstractPropertyNegative.ts(10,18): error TS2380: 'get' and 'set' accessor must have the same type 'number', but this 'get' accessor has the type 'string'.
2
+
tests/cases/compiler/abstractPropertyNegative.ts(11,18): error TS2380: 'get' and 'set' accessor must have the same type 'string', but this 'get' accessor has the type 'number'.
3
3
tests/cases/compiler/abstractPropertyNegative.ts(13,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'm' from class 'B'.
4
4
tests/cases/compiler/abstractPropertyNegative.ts(13,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'mismatch' from class 'B'.
5
5
tests/cases/compiler/abstractPropertyNegative.ts(13,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'prop' from class 'B'.
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2
-
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS2380: 'get' and 'set' accessor must have the same type.
2
+
tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS2380: 'get' and 'set' accessor must have the same type 'string', but this 'get' accessor has the type 'number'.
3
3
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
4
-
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type.
4
+
tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type 'number', but this 'get' accessor has the type 'string'.
Copy file name to clipboardexpand all lines: tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt
+6-4
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2
-
tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type.
2
+
tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type 'A<string>', but this 'get' accessor has the type 'A<T>'.
3
3
tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
4
-
tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type.
4
+
tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type 'A<T>', but this 'get' accessor has the type 'A<string>'.
5
5
tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A<string>' is not assignable to type 'A<T>'.
6
6
Type 'string' is not assignable to type 'T'.
7
7
@@ -15,14 +15,16 @@ tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A<s
15
15
~
16
16
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
17
17
~
18
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
18
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'A<string>', but this 'get' accessor has the type 'A<T>'.
19
+
!!! related TS2730 tests/cases/compiler/getAndSetNotIdenticalType2.ts:5:9: The respective 'set' accessor has the type 'A<string>'.
19
20
return this.data;
20
21
}
21
22
set x(v: A<string>) {
22
23
~
23
24
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
24
25
~
25
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
26
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'A<T>', but this 'get' accessor has the type 'A<string>'.
27
+
!!! related TS2730 tests/cases/compiler/getAndSetNotIdenticalType2.ts:8:9: The respective 'set' accessor has the type 'A<T>'.
26
28
this.data = v;
27
29
~~~~~~~~~
28
30
!!! error TS2322: Type 'A<string>' is not assignable to type 'A<T>'.
Copy file name to clipboardexpand all lines: tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt
+6-4
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
2
-
tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type.
2
+
tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type 'A<string>', but this 'get' accessor has the type 'A<number>'.
3
3
tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
4
-
tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type.
4
+
tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type 'A<number>', but this 'get' accessor has the type 'A<string>'.
5
5
tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A<string>' is not assignable to type 'A<number>'.
6
6
Type 'string' is not assignable to type 'number'.
7
7
@@ -15,14 +15,16 @@ tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A<s
15
15
~
16
16
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
17
17
~
18
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
18
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'A<string>', but this 'get' accessor has the type 'A<number>'.
19
+
!!! related TS2730 tests/cases/compiler/getAndSetNotIdenticalType3.ts:5:9: The respective 'set' accessor has the type 'A<string>'.
19
20
return this.data;
20
21
}
21
22
set x(v: A<string>) {
22
23
~
23
24
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
24
25
~
25
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
26
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'A<number>', but this 'get' accessor has the type 'A<string>'.
27
+
!!! related TS2730 tests/cases/compiler/getAndSetNotIdenticalType3.ts:8:9: The respective 'set' accessor has the type 'A<number>'.
26
28
this.data = v;
27
29
~~~~~~~~~
28
30
!!! error TS2322: Type 'A<string>' is not assignable to type 'A<number>'.
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(39,46): error TS1119: An object literal cannot have property and accessor with the same name.
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(42,16): error TS2380: 'get' and 'set' accessor must have the same type.
75
-
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(42,47): error TS2380: 'get' and 'set' accessor must have the same type.
74
+
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(42,16): error TS2380: 'get' and 'set' accessor must have the same type 'string', but this 'get' accessor has the type 'number'.
75
+
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(42,47): error TS2380: 'get' and 'set' accessor must have the same type 'number', but this 'get' accessor has the type 'string'.
76
76
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(43,22): error TS2322: Type '4' is not assignable to type 'string'.
77
-
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,16): error TS2380: 'get' and 'set' accessor must have the same type.
78
-
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,55): error TS2380: 'get' and 'set' accessor must have the same type.
77
+
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,16): error TS2380: 'get' and 'set' accessor must have the same type 'string', but this 'get' accessor has the type 'number'.
78
+
tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts(44,55): error TS2380: 'get' and 'set' accessor must have the same type 'number', but this 'get' accessor has the type 'string'.
// Get and set accessor with mismatched type annotations
269
269
var g1 = { get a(): number { return 4; }, set a(n: string) { } };
270
270
~
271
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
271
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'string', but this 'get' accessor has the type 'number'.
272
+
!!! related TS2730 tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts:42:16: The respective 'set' accessor has the type 'string'.
272
273
~
273
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
274
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'number', but this 'get' accessor has the type 'string'.
275
+
!!! related TS2730 tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts:42:47: The respective 'set' accessor has the type 'number'.
274
276
var g2 = { get a() { return 4; }, set a(n: string) { } };
275
277
~~~~~~~~~
276
278
!!! error TS2322: Type '4' is not assignable to type 'string'.
277
279
var g3 = { get a(): number { return undefined; }, set a(n: string) { } };
278
280
~
279
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
281
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'string', but this 'get' accessor has the type 'number'.
282
+
!!! related TS2730 tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts:44:16: The respective 'set' accessor has the type 'string'.
280
283
~
281
-
!!! error TS2380: 'get' and 'set' accessor must have the same type.
284
+
!!! error TS2380: 'get' and 'set' accessor must have the same type 'number', but this 'get' accessor has the type 'string'.
285
+
!!! related TS2730 tests/cases/conformance/expressions/objectLiterals/objectLiteralErrors.ts:44:55: The respective 'set' accessor has the type 'number'.
0 commit comments