Skip to content

Commit 4c93eb2

Browse files
committed
Accept baselines
1 parent 4200051 commit 4c93eb2

3 files changed

Lines changed: 21 additions & 46 deletions

File tree

tests/baselines/reference/classConstructorAccessibility3.errors.txt

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,11 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib
22
Cannot assign a 'protected' constructor type to a 'public' constructor type.
33
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(22,1): error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Foo'.
44
Cannot assign a 'private' constructor type to a 'public' constructor type.
5-
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(26,1): error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Baz'.
6-
Cannot assign a 'public' constructor type to a 'protected' constructor type.
7-
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(27,1): error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Baz'.
8-
Cannot assign a 'public' constructor type to a 'protected' constructor type.
95
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(28,1): error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Baz'.
106
Cannot assign a 'private' constructor type to a 'protected' constructor type.
11-
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(32,1): error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Qux'.
12-
Cannot assign a 'public' constructor type to a 'private' constructor type.
13-
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(33,1): error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Qux'.
14-
Cannot assign a 'public' constructor type to a 'private' constructor type.
15-
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(34,1): error TS2322: Type 'typeof Baz' is not assignable to type 'typeof Qux'.
16-
Cannot assign a 'protected' constructor type to a 'private' constructor type.
177

188

19-
==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts (8 errors) ====
9+
==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts (3 errors) ====
2010

2111
class Foo {
2212
constructor(public x: number) { }
@@ -48,30 +38,15 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib
4838

4939
// b is protected
5040
let b = Baz;
51-
b = Foo; // error Foo is public
52-
~
53-
!!! error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Baz'.
54-
!!! error TS2322: Cannot assign a 'public' constructor type to a 'protected' constructor type.
55-
b = Bar; // error Baz is public
56-
~
57-
!!! error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Baz'.
58-
!!! error TS2322: Cannot assign a 'public' constructor type to a 'protected' constructor type.
41+
b = Foo;
42+
b = Bar;
5943
b = Qux; // error Qux is private
6044
~
6145
!!! error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Baz'.
6246
!!! error TS2322: Cannot assign a 'private' constructor type to a 'protected' constructor type.
6347

6448
// c is private
6549
let c = Qux;
66-
c = Foo; // error Foo is public
67-
~
68-
!!! error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Qux'.
69-
!!! error TS2322: Cannot assign a 'public' constructor type to a 'private' constructor type.
70-
c = Bar; // error Bar is public
71-
~
72-
!!! error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Qux'.
73-
!!! error TS2322: Cannot assign a 'public' constructor type to a 'private' constructor type.
74-
c = Baz; // error Baz is protected
75-
~
76-
!!! error TS2322: Type 'typeof Baz' is not assignable to type 'typeof Qux'.
77-
!!! error TS2322: Cannot assign a 'protected' constructor type to a 'private' constructor type.
50+
c = Foo;
51+
c = Bar;
52+
c = Baz;

tests/baselines/reference/classConstructorAccessibility3.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ a = Qux; // error Qux is private
2424

2525
// b is protected
2626
let b = Baz;
27-
b = Foo; // error Foo is public
28-
b = Bar; // error Baz is public
27+
b = Foo;
28+
b = Bar;
2929
b = Qux; // error Qux is private
3030

3131
// c is private
3232
let c = Qux;
33-
c = Foo; // error Foo is public
34-
c = Bar; // error Bar is public
35-
c = Baz; // error Baz is protected
33+
c = Foo;
34+
c = Bar;
35+
c = Baz;
3636

3737
//// [classConstructorAccessibility3.js]
3838
var Foo = (function () {
@@ -66,14 +66,14 @@ a = Baz; // error Baz is protected
6666
a = Qux; // error Qux is private
6767
// b is protected
6868
var b = Baz;
69-
b = Foo; // error Foo is public
70-
b = Bar; // error Baz is public
69+
b = Foo;
70+
b = Bar;
7171
b = Qux; // error Qux is private
7272
// c is private
7373
var c = Qux;
74-
c = Foo; // error Foo is public
75-
c = Bar; // error Bar is public
76-
c = Baz; // error Baz is protected
74+
c = Foo;
75+
c = Bar;
76+
c = Baz;
7777

7878

7979
//// [classConstructorAccessibility3.d.ts]

tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ a = Qux; // error Qux is private
2424

2525
// b is protected
2626
let b = Baz;
27-
b = Foo; // error Foo is public
28-
b = Bar; // error Baz is public
27+
b = Foo;
28+
b = Bar;
2929
b = Qux; // error Qux is private
3030

3131
// c is private
3232
let c = Qux;
33-
c = Foo; // error Foo is public
34-
c = Bar; // error Bar is public
35-
c = Baz; // error Baz is protected
33+
c = Foo;
34+
c = Bar;
35+
c = Baz;

0 commit comments

Comments
 (0)