Skip to content

Commit 3197c17

Browse files
committed
Accept new baselines
1 parent 7bf375f commit 3197c17

10 files changed

+172
-184
lines changed

tests/baselines/reference/indexedAccessPrivateMemberOfGenericConstraint.errors.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(9,24): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
22
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(9,32): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
33
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(10,27): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
4-
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(11,27): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
54

65

7-
==== tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts (4 errors) ====
6+
==== tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts (3 errors) ====
87
class A {
98
private a: number;
109
}
@@ -22,6 +21,4 @@ tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(11,27): er
2221
~~~~~~
2322
!!! error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
2423
type Z<T extends A & B> = T["a"];
25-
~~~~~~
26-
!!! error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
2724

tests/baselines/reference/intersectionReduction.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tests/cases/conformance/types/intersection/intersectionReduction.ts(38,4): error TS2339: Property 'kind' does not exist on type 'never'.
2+
The intersection 'A & B' was reduced to 'never' because property 'kind' has conflicting types in some constituents.
23
tests/cases/conformance/types/intersection/intersectionReduction.ts(80,1): error TS2322: Type 'any' is not assignable to type 'never'.
34
tests/cases/conformance/types/intersection/intersectionReduction.ts(81,1): error TS2322: Type 'any' is not assignable to type 'never'.
45

@@ -44,6 +45,7 @@ tests/cases/conformance/types/intersection/intersectionReduction.ts(81,1): error
4445
ab.kind; // Error
4546
~~~~
4647
!!! error TS2339: Property 'kind' does not exist on type 'never'.
48+
!!! error TS2339: The intersection 'A & B' was reduced to 'never' because property 'kind' has conflicting types in some constituents.
4749

4850
declare let x: A | (B & C); // A
4951
let a: A = x;

tests/baselines/reference/intersectionReductionStrict.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tests/cases/conformance/types/intersection/intersectionReductionStrict.ts(38,4): error TS2339: Property 'kind' does not exist on type 'never'.
2+
The intersection 'A & B' was reduced to 'never' because property 'kind' has conflicting types in some constituents.
23
tests/cases/conformance/types/intersection/intersectionReductionStrict.ts(69,1): error TS2322: Type 'any' is not assignable to type 'never'.
34
tests/cases/conformance/types/intersection/intersectionReductionStrict.ts(70,1): error TS2322: Type 'any' is not assignable to type 'never'.
45

@@ -44,6 +45,7 @@ tests/cases/conformance/types/intersection/intersectionReductionStrict.ts(70,1):
4445
ab.kind; // Error
4546
~~~~
4647
!!! error TS2339: Property 'kind' does not exist on type 'never'.
48+
!!! error TS2339: The intersection 'A & B' was reduced to 'never' because property 'kind' has conflicting types in some constituents.
4749

4850
declare let x: A | (B & C); // A
4951
let a: A = x;

tests/baselines/reference/mixinAccessModifiers.errors.txt

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
tests/cases/conformance/classes/mixinAccessModifiers.ts(38,4): error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Private2'.
2-
tests/cases/conformance/classes/mixinAccessModifiers.ts(42,4): error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Protected'.
3-
tests/cases/conformance/classes/mixinAccessModifiers.ts(46,4): error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Public'.
1+
tests/cases/conformance/classes/mixinAccessModifiers.ts(38,4): error TS2339: Property 'p' does not exist on type 'never'.
2+
The intersection 'Private & Private2' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
3+
tests/cases/conformance/classes/mixinAccessModifiers.ts(42,4): error TS2339: Property 'p' does not exist on type 'never'.
4+
The intersection 'Private & Protected' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
5+
tests/cases/conformance/classes/mixinAccessModifiers.ts(46,4): error TS2339: Property 'p' does not exist on type 'never'.
6+
The intersection 'Private & Public' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
47
tests/cases/conformance/classes/mixinAccessModifiers.ts(50,4): error TS2445: Property 'p' is protected and only accessible within class 'Protected & Protected2' and its subclasses.
5-
tests/cases/conformance/classes/mixinAccessModifiers.ts(65,7): error TS2415: Class 'C1' incorrectly extends base class 'Private & Private2'.
6-
Type 'C1' is not assignable to type 'Private'.
7-
Property 'p' has conflicting declarations and is inaccessible in type 'C1'.
8-
tests/cases/conformance/classes/mixinAccessModifiers.ts(66,7): error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'.
9-
Type 'C2' is not assignable to type 'Private'.
10-
Property 'p' has conflicting declarations and is inaccessible in type 'C2'.
11-
tests/cases/conformance/classes/mixinAccessModifiers.ts(67,7): error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'.
12-
Type 'C3' is not assignable to type 'Private'.
13-
Property 'p' has conflicting declarations and is inaccessible in type 'C3'.
8+
tests/cases/conformance/classes/mixinAccessModifiers.ts(65,18): error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
9+
The intersection 'Private & Private2' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
10+
tests/cases/conformance/classes/mixinAccessModifiers.ts(66,18): error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
11+
The intersection 'Private & Protected' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
12+
tests/cases/conformance/classes/mixinAccessModifiers.ts(67,18): error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
13+
The intersection 'Private & Public' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
1414
tests/cases/conformance/classes/mixinAccessModifiers.ts(84,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
1515
tests/cases/conformance/classes/mixinAccessModifiers.ts(89,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
1616
tests/cases/conformance/classes/mixinAccessModifiers.ts(97,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
1717
tests/cases/conformance/classes/mixinAccessModifiers.ts(102,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
1818
tests/cases/conformance/classes/mixinAccessModifiers.ts(119,4): error TS2341: Property 'privateMethod' is private and only accessible within class 'ProtectedGeneric<T>'.
1919
tests/cases/conformance/classes/mixinAccessModifiers.ts(120,4): error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<T>' and its subclasses.
20-
tests/cases/conformance/classes/mixinAccessModifiers.ts(124,4): error TS2546: Property 'privateMethod' has conflicting declarations and is inaccessible in type 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>'.
21-
tests/cases/conformance/classes/mixinAccessModifiers.ts(125,4): error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>' and its subclasses.
22-
tests/cases/conformance/classes/mixinAccessModifiers.ts(129,4): error TS2546: Property 'privateMethod' has conflicting declarations and is inaccessible in type 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric<{ a: void; b: void; }>'.
20+
tests/cases/conformance/classes/mixinAccessModifiers.ts(124,4): error TS2339: Property 'privateMethod' does not exist on type 'never'.
21+
The intersection 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>' was reduced to 'never' because property 'privateMethod' exists in multiple constituents and is private in some.
22+
tests/cases/conformance/classes/mixinAccessModifiers.ts(125,4): error TS2339: Property 'protectedMethod' does not exist on type 'never'.
23+
The intersection 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>' was reduced to 'never' because property 'privateMethod' exists in multiple constituents and is private in some.
24+
tests/cases/conformance/classes/mixinAccessModifiers.ts(129,4): error TS2341: Property 'privateMethod' is private and only accessible within class 'ProtectedGeneric<T>'.
2325
tests/cases/conformance/classes/mixinAccessModifiers.ts(130,4): error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<T>' and its subclasses.
2426

2527

@@ -63,19 +65,22 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(130,4): error TS2445: Pr
6365
function f1(x: Private & Private2) {
6466
x.p; // Error, private constituent makes property inaccessible
6567
~
66-
!!! error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Private2'.
68+
!!! error TS2339: Property 'p' does not exist on type 'never'.
69+
!!! error TS2339: The intersection 'Private & Private2' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
6770
}
6871

6972
function f2(x: Private & Protected) {
7073
x.p; // Error, private constituent makes property inaccessible
7174
~
72-
!!! error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Protected'.
75+
!!! error TS2339: Property 'p' does not exist on type 'never'.
76+
!!! error TS2339: The intersection 'Private & Protected' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
7377
}
7478

7579
function f3(x: Private & Public) {
7680
x.p; // Error, private constituent makes property inaccessible
7781
~
78-
!!! error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Public'.
82+
!!! error TS2339: Property 'p' does not exist on type 'never'.
83+
!!! error TS2339: The intersection 'Private & Public' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
7984
}
8085

8186
function f4(x: Protected & Protected2) {
@@ -97,20 +102,17 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(130,4): error TS2445: Pr
97102
// Can't derive from type with inaccessible properties
98103

99104
class C1 extends Mix(Private, Private2) {}
100-
~~
101-
!!! error TS2415: Class 'C1' incorrectly extends base class 'Private & Private2'.
102-
!!! error TS2415: Type 'C1' is not assignable to type 'Private'.
103-
!!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C1'.
105+
~~~~~~~~~~~~~~~~~~~~~~
106+
!!! error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
107+
!!! error TS2509: The intersection 'Private & Private2' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
104108
class C2 extends Mix(Private, Protected) {}
105-
~~
106-
!!! error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'.
107-
!!! error TS2415: Type 'C2' is not assignable to type 'Private'.
108-
!!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C2'.
109+
~~~~~~~~~~~~~~~~~~~~~~~
110+
!!! error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
111+
!!! error TS2509: The intersection 'Private & Protected' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
109112
class C3 extends Mix(Private, Public) {}
110-
~~
111-
!!! error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'.
112-
!!! error TS2415: Type 'C3' is not assignable to type 'Private'.
113-
!!! error TS2415: Property 'p' has conflicting declarations and is inaccessible in type 'C3'.
113+
~~~~~~~~~~~~~~~~~~~~
114+
!!! error TS2509: Base constructor return type 'never' is not an object type or intersection of object types with statically known members.
115+
!!! error TS2509: The intersection 'Private & Public' was reduced to 'never' because property 'p' exists in multiple constituents and is private in some.
114116

115117
class C4 extends Mix(Protected, Protected2) {
116118
f(c4: C4, c5: C5, c6: C6) {
@@ -181,16 +183,18 @@ tests/cases/conformance/classes/mixinAccessModifiers.ts(130,4): error TS2445: Pr
181183
function f8(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric2<{a:void;b:void;}>) {
182184
x.privateMethod(); // Error, private constituent makes method inaccessible
183185
~~~~~~~~~~~~~
184-
!!! error TS2546: Property 'privateMethod' has conflicting declarations and is inaccessible in type 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>'.
186+
!!! error TS2339: Property 'privateMethod' does not exist on type 'never'.
187+
!!! error TS2339: The intersection 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>' was reduced to 'never' because property 'privateMethod' exists in multiple constituents and is private in some.
185188
x.protectedMethod(); // Error, protected when all constituents are protected
186189
~~~~~~~~~~~~~~~
187-
!!! error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>' and its subclasses.
190+
!!! error TS2339: Property 'protectedMethod' does not exist on type 'never'.
191+
!!! error TS2339: The intersection 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric2<{ a: void; b: void; }>' was reduced to 'never' because property 'privateMethod' exists in multiple constituents and is private in some.
188192
}
189193

190194
function f9(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric<{a:void;b:void;}>) {
191195
x.privateMethod(); // Error, private constituent makes method inaccessible
192196
~~~~~~~~~~~~~
193-
!!! error TS2546: Property 'privateMethod' has conflicting declarations and is inaccessible in type 'ProtectedGeneric<{ a: void; }> & ProtectedGeneric<{ a: void; b: void; }>'.
197+
!!! error TS2341: Property 'privateMethod' is private and only accessible within class 'ProtectedGeneric<T>'.
194198
x.protectedMethod(); // Error, protected when all constituents are protected
195199
~~~~~~~~~~~~~~~
196200
!!! error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<T>' and its subclasses.

tests/baselines/reference/mixinAccessModifiers.symbols

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ function f1(x: Private & Private2) {
8282
>Private2 : Symbol(Private2, Decl(mixinAccessModifiers.ts, 5, 1))
8383

8484
x.p; // Error, private constituent makes property inaccessible
85-
>x.p : Symbol(p, Decl(mixinAccessModifiers.ts, 3, 32), Decl(mixinAccessModifiers.ts, 8, 32))
8685
>x : Symbol(x, Decl(mixinAccessModifiers.ts, 36, 12))
87-
>p : Symbol(p, Decl(mixinAccessModifiers.ts, 3, 32), Decl(mixinAccessModifiers.ts, 8, 32))
8886
}
8987

9088
function f2(x: Private & Protected) {
@@ -94,9 +92,7 @@ function f2(x: Private & Protected) {
9492
>Protected : Symbol(Protected, Decl(mixinAccessModifiers.ts, 10, 1))
9593

9694
x.p; // Error, private constituent makes property inaccessible
97-
>x.p : Symbol(p, Decl(mixinAccessModifiers.ts, 3, 32), Decl(mixinAccessModifiers.ts, 13, 32))
9895
>x : Symbol(x, Decl(mixinAccessModifiers.ts, 40, 12))
99-
>p : Symbol(p, Decl(mixinAccessModifiers.ts, 3, 32), Decl(mixinAccessModifiers.ts, 13, 32))
10096
}
10197

10298
function f3(x: Private & Public) {
@@ -106,9 +102,7 @@ function f3(x: Private & Public) {
106102
>Public : Symbol(Public, Decl(mixinAccessModifiers.ts, 22, 1))
107103

108104
x.p; // Error, private constituent makes property inaccessible
109-
>x.p : Symbol(p, Decl(mixinAccessModifiers.ts, 3, 32), Decl(mixinAccessModifiers.ts, 25, 32))
110105
>x : Symbol(x, Decl(mixinAccessModifiers.ts, 44, 12))
111-
>p : Symbol(p, Decl(mixinAccessModifiers.ts, 3, 32), Decl(mixinAccessModifiers.ts, 25, 32))
112106
}
113107

114108
function f4(x: Protected & Protected2) {
@@ -377,14 +371,10 @@ function f8(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric2<{a:void;b:void;}
377371
>b : Symbol(b, Decl(mixinAccessModifiers.ts, 122, 72))
378372

379373
x.privateMethod(); // Error, private constituent makes method inaccessible
380-
>x.privateMethod : Symbol(privateMethod, Decl(mixinAccessModifiers.ts, 107, 27), Decl(mixinAccessModifiers.ts, 112, 28))
381374
>x : Symbol(x, Decl(mixinAccessModifiers.ts, 122, 12))
382-
>privateMethod : Symbol(privateMethod, Decl(mixinAccessModifiers.ts, 107, 27), Decl(mixinAccessModifiers.ts, 112, 28))
383375

384376
x.protectedMethod(); // Error, protected when all constituents are protected
385-
>x.protectedMethod : Symbol(protectedMethod, Decl(mixinAccessModifiers.ts, 108, 27), Decl(mixinAccessModifiers.ts, 113, 27))
386377
>x : Symbol(x, Decl(mixinAccessModifiers.ts, 122, 12))
387-
>protectedMethod : Symbol(protectedMethod, Decl(mixinAccessModifiers.ts, 108, 27), Decl(mixinAccessModifiers.ts, 113, 27))
388378
}
389379

390380
function f9(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric<{a:void;b:void;}>) {

0 commit comments

Comments
 (0)