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
Offer per-member diagnostics for incorrectly implemented inherited members (#21036)
* Offer per-member diagnostics for incorrectly implemented inherited members on classes
* Revise error message, make containingChain a thunk
* Fix typo in comment
tests/cases/compiler/abstractPropertyNegative.ts(19,3): error TS2540: Cannot assign to 'ro' because it is a constant or a read-only property.
10
-
tests/cases/compiler/abstractPropertyNegative.ts(24,7): error TS2415: Class 'WrongTypePropertyImpl' incorrectly extends base class 'WrongTypeProperty'.
11
-
Types of property 'num' are incompatible.
12
-
Type 'string' is not assignable to type 'number'.
13
-
tests/cases/compiler/abstractPropertyNegative.ts(30,7): error TS2415: Class 'WrongTypeAccessorImpl' incorrectly extends base class 'WrongTypeAccessor'.
14
-
Types of property 'num' are incompatible.
15
-
Type 'string' is not assignable to type 'number'.
16
-
tests/cases/compiler/abstractPropertyNegative.ts(33,7): error TS2415: Class 'WrongTypeAccessorImpl2' incorrectly extends base class 'WrongTypeAccessor'.
17
-
Types of property 'num' are incompatible.
18
-
Type 'string' is not assignable to type 'number'.
10
+
tests/cases/compiler/abstractPropertyNegative.ts(25,5): error TS2416: Property 'num' in type 'WrongTypePropertyImpl' is not assignable to the same property in base type 'number'.
11
+
Type 'string' is not assignable to type 'number'.
12
+
tests/cases/compiler/abstractPropertyNegative.ts(31,9): error TS2416: Property 'num' in type 'WrongTypeAccessorImpl' is not assignable to the same property in base type 'number'.
13
+
Type 'string' is not assignable to type 'number'.
14
+
tests/cases/compiler/abstractPropertyNegative.ts(34,5): error TS2416: Property 'num' in type 'WrongTypeAccessorImpl2' is not assignable to the same property in base type 'number'.
15
+
Type 'string' is not assignable to type 'number'.
19
16
tests/cases/compiler/abstractPropertyNegative.ts(38,18): error TS2676: Accessors must both be abstract or non-abstract.
20
17
tests/cases/compiler/abstractPropertyNegative.ts(39,9): error TS2676: Accessors must both be abstract or non-abstract.
21
18
tests/cases/compiler/abstractPropertyNegative.ts(40,9): error TS2676: Accessors must both be abstract or non-abstract.
Copy file name to clipboardExpand all lines: tests/baselines/reference/apparentTypeSubtyping.errors.txt
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
-
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(9,7): error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base<string>'.
2
-
Types of property 'x' are incompatible.
3
-
Type 'String' is not assignable to type 'string'.
4
-
'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
1
+
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSubtyping.ts(10,5): error TS2416: Property 'x' in type 'Derived<U>' is not assignable to the same property in base type 'string'.
2
+
Type 'String' is not assignable to type 'string'.
3
+
'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(9,7): error TS2415: Class 'Derived<U>' incorrectly extends base class 'Base'.
2
-
Types of property 'x' are incompatible.
3
-
Type 'U' is not assignable to type 'string'.
4
-
Type 'String' is not assignable to type 'string'.
5
-
'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
1
+
tests/cases/conformance/types/typeRelationships/apparentType/apparentTypeSupertype.ts(10,5): error TS2416: Property 'x' in type 'Derived<U>' is not assignable to the same property in base type 'string'.
2
+
Type 'U' is not assignable to type 'string'.
3
+
Type 'String' is not assignable to type 'string'.
4
+
'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
0 commit comments