Skip to content

Commit 33e5684

Browse files
committed
Accept new baselines
1 parent ee03c0d commit 33e5684

7 files changed

+36
-29
lines changed

tests/baselines/reference/circularIndexedAccessErrors.errors.txt

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(3,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
22
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(7,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
3-
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(15,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
43
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(19,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
54
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(23,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
6-
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(27,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
7-
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(28,5): error TS2502: 'y' is referenced directly or indirectly in its own type annotation.
8-
tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(29,5): error TS2502: 'z' is referenced directly or indirectly in its own type annotation.
95

106

11-
==== tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts (8 errors) ====
7+
==== tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts (4 errors) ====
128

139
type T1 = {
1410
x: T1["x"]; // Error
@@ -27,9 +23,7 @@ tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(29,5): error
2723
let x2x = x2.x;
2824

2925
interface T3<T extends T3<T>> {
30-
x: T["x"]; // Error
31-
~~~~~~~~~~
32-
!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
26+
x: T["x"];
3327
}
3428

3529
interface T4<T extends T4<T>> {
@@ -45,13 +39,7 @@ tests/cases/conformance/types/keyof/circularIndexedAccessErrors.ts(29,5): error
4539
}
4640

4741
class C2 {
48-
x: this["y"]; // Error
49-
~~~~~~~~~~~~~
50-
!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation.
51-
y: this["z"]; // Error
52-
~~~~~~~~~~~~~
53-
!!! error TS2502: 'y' is referenced directly or indirectly in its own type annotation.
54-
z: this["x"]; // Error
55-
~~~~~~~~~~~~~
56-
!!! error TS2502: 'z' is referenced directly or indirectly in its own type annotation.
42+
x: this["y"];
43+
y: this["z"];
44+
z: this["x"];
5745
}

tests/baselines/reference/circularIndexedAccessErrors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare let x2: T2<"x">;
1313
let x2x = x2.x;
1414

1515
interface T3<T extends T3<T>> {
16-
x: T["x"]; // Error
16+
x: T["x"];
1717
}
1818

1919
interface T4<T extends T4<T>> {
@@ -25,9 +25,9 @@ class C1 {
2525
}
2626

2727
class C2 {
28-
x: this["y"]; // Error
29-
y: this["z"]; // Error
30-
z: this["x"]; // Error
28+
x: this["y"];
29+
y: this["z"];
30+
z: this["x"];
3131
}
3232

3333
//// [circularIndexedAccessErrors.js]

tests/baselines/reference/mappedTypeErrors.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,5): error TS2322: T
4545
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(131,5): error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: any; a?: number | undefined; }'.
4646
Types of property 'a' are incompatible.
4747
Type 'string' is not assignable to type 'number | undefined'.
48-
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,16): error TS2322: Type '{}' is not assignable to type 'string'.
48+
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,16): error TS2322: Type 'T' is not assignable to type 'string'.
4949
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,21): error TS2536: Type 'P' cannot be used to index type 'T'.
5050

5151

@@ -259,7 +259,7 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(137,21): error TS2536:
259259
pf: {[P in F]?: T[P]},
260260
pt: {[P in T]?: T[P]}, // note: should be in keyof T
261261
~
262-
!!! error TS2322: Type '{}' is not assignable to type 'string'.
262+
!!! error TS2322: Type 'T' is not assignable to type 'string'.
263263
~~~~
264264
!!! error TS2536: Type 'P' cannot be used to index type 'T'.
265265
};

tests/baselines/reference/mappedTypeRelationships.errors.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(12,5): error TS2
33
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(17,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
44
Type 'T' is not assignable to type 'U'.
55
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(21,5): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
6+
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,5): error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
7+
Type 'T' is not assignable to type 'U'.
68
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,12): error TS2536: Type 'keyof U' cannot be used to index type 'T'.
79
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(26,5): error TS2536: Type 'K' cannot be used to index type 'T'.
10+
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
11+
Type 'T' is not assignable to type 'U'.
812
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,12): error TS2536: Type 'K' cannot be used to index type 'T'.
913
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(31,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
1014
Type 'undefined' is not assignable to type 'T[keyof T]'.
@@ -28,7 +32,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(71,5): error TS2
2832
tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2322: Type 'Partial<T>' is not assignable to type 'T'.
2933

3034

31-
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (18 errors) ====
35+
==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (20 errors) ====
3236

3337
function f1<T>(x: T, k: keyof T) {
3438
return x[k];
@@ -59,6 +63,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2
5963
~~~~
6064
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
6165
y[k] = x[k]; // Error
66+
~~~~
67+
!!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'.
68+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
6269
~~~~
6370
!!! error TS2536: Type 'keyof U' cannot be used to index type 'T'.
6471
}
@@ -68,6 +75,9 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2
6875
~~~~
6976
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
7077
y[k] = x[k]; // Error
78+
~~~~
79+
!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'.
80+
!!! error TS2322: Type 'T' is not assignable to type 'U'.
7181
~~~~
7282
!!! error TS2536: Type 'K' cannot be used to index type 'T'.
7383
}

tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterInd
2323
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(16,21): error TS2313: Type parameter 'T' has a circular constraint.
2424
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(16,34): error TS2313: Type parameter 'U' has a circular constraint.
2525
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(16,47): error TS2313: Type parameter 'V' has a circular constraint.
26+
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(18,19): error TS2313: Type parameter 'U' has a circular constraint.
2627
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(18,32): error TS2313: Type parameter 'T' has a circular constraint.
2728
tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts(18,45): error TS2313: Type parameter 'V' has a circular constraint.
2829

2930

30-
==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts (27 errors) ====
31+
==== tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterIndirectlyConstrainedToItself.ts (28 errors) ====
3132
class C<U extends T, T extends U> { }
3233
~
3334
!!! error TS2313: Type parameter 'U' has a circular constraint.
@@ -96,6 +97,8 @@ tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterInd
9697
!!! error TS2313: Type parameter 'V' has a circular constraint.
9798

9899
class D<U extends T, T extends V, V extends T> { }
100+
~
101+
!!! error TS2313: Type parameter 'U' has a circular constraint.
99102
~
100103
!!! error TS2313: Type parameter 'T' has a circular constraint.
101104
~
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(1,19): error TS2313: Type parameter 'T' has a circular constraint.
2+
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(4,19): error TS2339: Property 'foo' does not exist on type 'T'.
3+
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(5,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
4+
tests/cases/compiler/typeParameterWithInvalidConstraintType.ts(7,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
25

36

4-
==== tests/cases/compiler/typeParameterWithInvalidConstraintType.ts (1 errors) ====
7+
==== tests/cases/compiler/typeParameterWithInvalidConstraintType.ts (4 errors) ====
58
class A<T extends T> {
69
~
710
!!! error TS2313: Type parameter 'T' has a circular constraint.
811
foo() {
912
var x: T;
10-
// no error expected below this line
1113
var a = x.foo();
14+
~~~
15+
!!! error TS2339: Property 'foo' does not exist on type 'T'.
1216
var b = new x(123);
17+
~~~~~~~~~~
18+
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
1319
var c = x[1];
1420
var d = x();
21+
~~~
22+
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.
1523
}
1624
}

tests/baselines/reference/typeParameterWithInvalidConstraintType.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
class A<T extends T> {
33
foo() {
44
var x: T;
5-
// no error expected below this line
65
var a = x.foo();
76
var b = new x(123);
87
var c = x[1];
@@ -16,7 +15,6 @@ var A = (function () {
1615
}
1716
A.prototype.foo = function () {
1817
var x;
19-
// no error expected below this line
2018
var a = x.foo();
2119
var b = new x(123);
2220
var c = x[1];

0 commit comments

Comments
 (0)