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: tests/baselines/reference/indexedAccessPrivateMemberOfGenericConstraint.errors.txt
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,9 @@
1
1
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(9,24): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
2
2
tests/cases/compiler/indexedAccessPrivateMemberOfGenericConstraint.ts(9,32): error TS4105: Private or protected member 'a' cannot be accessed on a type parameter.
3
3
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.
Copy file name to clipboardExpand all lines: tests/baselines/reference/mixinAccessModifiers.errors.txt
+37-33Lines changed: 37 additions & 33 deletions
Original file line number
Diff line number
Diff 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.
4
7
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.
14
14
tests/cases/conformance/classes/mixinAccessModifiers.ts(84,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
15
15
tests/cases/conformance/classes/mixinAccessModifiers.ts(89,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
16
16
tests/cases/conformance/classes/mixinAccessModifiers.ts(97,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
17
17
tests/cases/conformance/classes/mixinAccessModifiers.ts(102,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
18
18
tests/cases/conformance/classes/mixinAccessModifiers.ts(119,4): error TS2341: Property 'privateMethod' is private and only accessible within class 'ProtectedGeneric<T>'.
19
19
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>'.
23
25
tests/cases/conformance/classes/mixinAccessModifiers.ts(130,4): error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<T>' and its subclasses.
x.p; // Error, private constituent makes property inaccessible
65
67
~
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.
67
70
}
68
71
69
72
function f2(x: Private & Protected) {
70
73
x.p; // Error, private constituent makes property inaccessible
71
74
~
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.
73
77
}
74
78
75
79
function f3(x: Private & Public) {
76
80
x.p; // Error, private constituent makes property inaccessible
77
81
~
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.
// Can't derive from type with inaccessible properties
98
103
99
104
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.
104
108
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.
109
112
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.
function f8(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric2<{a:void;b:void;}>) {
182
184
x.privateMethod(); // Error, private constituent makes method inaccessible
183
185
~~~~~~~~~~~~~
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.
185
188
x.protectedMethod(); // Error, protected when all constituents are protected
186
189
~~~~~~~~~~~~~~~
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.
188
192
}
189
193
190
194
function f9(x: ProtectedGeneric<{a: void;}> & ProtectedGeneric<{a:void;b:void;}>) {
191
195
x.privateMethod(); // Error, private constituent makes method inaccessible
192
196
~~~~~~~~~~~~~
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>'.
194
198
x.protectedMethod(); // Error, protected when all constituents are protected
195
199
~~~~~~~~~~~~~~~
196
200
!!! error TS2445: Property 'protectedMethod' is protected and only accessible within class 'ProtectedGeneric<T>' and its subclasses.
0 commit comments