|
1 |
| -tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(28,28): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. |
2 | 1 | tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(32,24): error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private.
|
3 | 2 | tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(35,28): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.
|
4 | 3 | tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(36,35): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.
|
5 | 4 | tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(40,10): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration.
|
6 | 5 | tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(41,10): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.
|
7 | 6 |
|
8 | 7 |
|
9 |
| -==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts (6 errors) ==== |
| 8 | +==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts (5 errors) ==== |
10 | 9 |
|
11 | 10 | class BaseA {
|
12 | 11 | public constructor(public x: number) { }
|
@@ -34,9 +33,7 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib
|
34 | 33 | class DerivedB extends BaseB {
|
35 | 34 | constructor(public x: number) { super(x); }
|
36 | 35 | createInstance() { new DerivedB(7); }
|
37 |
| - createBaseInstance() { new BaseB(8); } // error |
38 |
| - ~~~~~~~~~~~~ |
39 |
| -!!! error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. |
| 36 | + createBaseInstance() { new BaseB(8); } // ok |
40 | 37 | static staticBaseInstance() { new BaseB(9); } // ok
|
41 | 38 | }
|
42 | 39 |
|
|
0 commit comments