Skip to content

Commit 3c76c3e

Browse files
committed
Baselines for weak types
1 parent bdcc4eb commit 3c76c3e

9 files changed

+1053
-10559
lines changed

tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(33,5): error TS2322: Type 'D' is not assignable to type 'C'.
2+
Weak type 'C' has no properties in common with 'D'.
3+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(34,5): error TS2322: Type 'E' is not assignable to type 'C'.
4+
Weak type 'C' has no properties in common with 'E'.
5+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(35,5): error TS2322: Type 'F' is not assignable to type 'C'.
6+
Weak type 'C' has no properties in common with 'F'.
7+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(38,5): error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'.
8+
Weak type '{ opt?: Base; }' has no properties in common with 'D'.
9+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(39,5): error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'.
10+
Weak type '{ opt?: Base; }' has no properties in common with 'E'.
11+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(40,5): error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'.
12+
Weak type '{ opt?: Base; }' has no properties in common with 'F'.
13+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(43,5): error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'.
14+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(44,5): error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'.
15+
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(45,5): error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'.
116
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(74,5): error TS2322: Type 'D' is not assignable to type 'C'.
217
Property 'opt' is missing in type 'D'.
318
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts(75,5): error TS2322: Type 'E' is not assignable to type 'C'.
@@ -18,7 +33,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
1833
Property 'opt' is missing in type 'F'.
1934

2035

21-
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts (9 errors) ====
36+
==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts (18 errors) ====
2237
// M is optional and S contains no property with the same name as M
2338
// N is optional and T contains no property with the same name as N
2439

@@ -52,18 +67,42 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
5267

5368
// all ok
5469
c = d;
70+
~
71+
!!! error TS2322: Type 'D' is not assignable to type 'C'.
72+
!!! error TS2322: Weak type 'C' has no properties in common with 'D'.
5573
c = e;
74+
~
75+
!!! error TS2322: Type 'E' is not assignable to type 'C'.
76+
!!! error TS2322: Weak type 'C' has no properties in common with 'E'.
5677
c = f;
78+
~
79+
!!! error TS2322: Type 'F' is not assignable to type 'C'.
80+
!!! error TS2322: Weak type 'C' has no properties in common with 'F'.
5781
c = a;
5882

5983
a = d;
84+
~
85+
!!! error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'.
86+
!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'D'.
6087
a = e;
88+
~
89+
!!! error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'.
90+
!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'E'.
6191
a = f;
92+
~
93+
!!! error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'.
94+
!!! error TS2322: Weak type '{ opt?: Base; }' has no properties in common with 'F'.
6295
a = c;
6396

6497
b = d;
98+
~
99+
!!! error TS2322: Type 'D' is not assignable to type '{ opt?: Base; }'.
65100
b = e;
101+
~
102+
!!! error TS2322: Type 'E' is not assignable to type '{ opt?: Base; }'.
66103
b = f;
104+
~
105+
!!! error TS2322: Type 'F' is not assignable to type '{ opt?: Base; }'.
67106
b = a;
68107
b = c;
69108
}

tests/baselines/reference/subtypingWithObjectMembers5.errors.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
44
Property '1' is missing in type 'B2'.
55
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(32,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'.
66
Property ''1'' is missing in type 'B3'.
7+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(43,11): error TS2420: Class 'B' incorrectly implements interface 'A'.
8+
Weak type 'A' has no properties in common with 'B'.
9+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(51,11): error TS2420: Class 'B2' incorrectly implements interface 'A2'.
10+
Weak type 'A2' has no properties in common with 'B2'.
11+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts(59,11): error TS2420: Class 'B3' incorrectly implements interface 'A3'.
12+
Weak type 'A3' has no properties in common with 'B3'.
713

814

9-
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts (3 errors) ====
15+
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts (6 errors) ====
1016
interface Base {
1117
foo: string;
1218
}
@@ -59,6 +65,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
5965
}
6066

6167
class B implements A {
68+
~
69+
!!! error TS2420: Class 'B' incorrectly implements interface 'A'.
70+
!!! error TS2420: Weak type 'A' has no properties in common with 'B'.
6271
fooo: Derived; // ok
6372
}
6473

@@ -67,6 +76,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
6776
}
6877

6978
class B2 implements A2 {
79+
~~
80+
!!! error TS2420: Class 'B2' incorrectly implements interface 'A2'.
81+
!!! error TS2420: Weak type 'A2' has no properties in common with 'B2'.
7082
2: Derived; // ok
7183
}
7284

@@ -75,6 +87,9 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingW
7587
}
7688

7789
class B3 implements A3 {
90+
~~
91+
!!! error TS2420: Class 'B3' incorrectly implements interface 'A3'.
92+
!!! error TS2420: Weak type 'A3' has no properties in common with 'B3'.
7893
'1.0': Derived; // ok
7994
}
8095
}

0 commit comments

Comments
 (0)