From 4c93eb2e98703ae86c81721d28b03babdf24bc61 Mon Sep 17 00:00:00 2001 From: AbubakerB Date: Thu, 4 Feb 2016 21:00:50 +0000 Subject: [PATCH] Accept baselines --- .../classConstructorAccessibility3.errors.txt | 37 +++---------------- .../classConstructorAccessibility3.js | 20 +++++----- .../classConstructorAccessibility3.ts | 10 ++--- 3 files changed, 21 insertions(+), 46 deletions(-) diff --git a/tests/baselines/reference/classConstructorAccessibility3.errors.txt b/tests/baselines/reference/classConstructorAccessibility3.errors.txt index c536db1f9da..1b96db289dc 100644 --- a/tests/baselines/reference/classConstructorAccessibility3.errors.txt +++ b/tests/baselines/reference/classConstructorAccessibility3.errors.txt @@ -2,21 +2,11 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib Cannot assign a 'protected' constructor type to a 'public' constructor type. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(22,1): error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Foo'. Cannot assign a 'private' constructor type to a 'public' constructor type. -tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(26,1): error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Baz'. - Cannot assign a 'public' constructor type to a 'protected' constructor type. -tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(27,1): error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Baz'. - Cannot assign a 'public' constructor type to a 'protected' constructor type. tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(28,1): error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Baz'. Cannot assign a 'private' constructor type to a 'protected' constructor type. -tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(32,1): error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Qux'. - Cannot assign a 'public' constructor type to a 'private' constructor type. -tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(33,1): error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Qux'. - Cannot assign a 'public' constructor type to a 'private' constructor type. -tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts(34,1): error TS2322: Type 'typeof Baz' is not assignable to type 'typeof Qux'. - Cannot assign a 'protected' constructor type to a 'private' constructor type. -==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts (8 errors) ==== +==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts (3 errors) ==== class Foo { constructor(public x: number) { } @@ -48,14 +38,8 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib // b is protected let b = Baz; - b = Foo; // error Foo is public - ~ -!!! error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Baz'. -!!! error TS2322: Cannot assign a 'public' constructor type to a 'protected' constructor type. - b = Bar; // error Baz is public - ~ -!!! error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Baz'. -!!! error TS2322: Cannot assign a 'public' constructor type to a 'protected' constructor type. + b = Foo; + b = Bar; b = Qux; // error Qux is private ~ !!! error TS2322: Type 'typeof Qux' is not assignable to type 'typeof Baz'. @@ -63,15 +47,6 @@ tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessib // c is private let c = Qux; - c = Foo; // error Foo is public - ~ -!!! error TS2322: Type 'typeof Foo' is not assignable to type 'typeof Qux'. -!!! error TS2322: Cannot assign a 'public' constructor type to a 'private' constructor type. - c = Bar; // error Bar is public - ~ -!!! error TS2322: Type 'typeof Bar' is not assignable to type 'typeof Qux'. -!!! error TS2322: Cannot assign a 'public' constructor type to a 'private' constructor type. - c = Baz; // error Baz is protected - ~ -!!! error TS2322: Type 'typeof Baz' is not assignable to type 'typeof Qux'. -!!! error TS2322: Cannot assign a 'protected' constructor type to a 'private' constructor type. \ No newline at end of file + c = Foo; + c = Bar; + c = Baz; \ No newline at end of file diff --git a/tests/baselines/reference/classConstructorAccessibility3.js b/tests/baselines/reference/classConstructorAccessibility3.js index 02f5bb45a86..acc7d38aa55 100644 --- a/tests/baselines/reference/classConstructorAccessibility3.js +++ b/tests/baselines/reference/classConstructorAccessibility3.js @@ -24,15 +24,15 @@ a = Qux; // error Qux is private // b is protected let b = Baz; -b = Foo; // error Foo is public -b = Bar; // error Baz is public +b = Foo; +b = Bar; b = Qux; // error Qux is private // c is private let c = Qux; -c = Foo; // error Foo is public -c = Bar; // error Bar is public -c = Baz; // error Baz is protected +c = Foo; +c = Bar; +c = Baz; //// [classConstructorAccessibility3.js] var Foo = (function () { @@ -66,14 +66,14 @@ a = Baz; // error Baz is protected a = Qux; // error Qux is private // b is protected var b = Baz; -b = Foo; // error Foo is public -b = Bar; // error Baz is public +b = Foo; +b = Bar; b = Qux; // error Qux is private // c is private var c = Qux; -c = Foo; // error Foo is public -c = Bar; // error Bar is public -c = Baz; // error Baz is protected +c = Foo; +c = Bar; +c = Baz; //// [classConstructorAccessibility3.d.ts] diff --git a/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts b/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts index 8508a40d101..91bb4873d96 100644 --- a/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts +++ b/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility3.ts @@ -24,12 +24,12 @@ a = Qux; // error Qux is private // b is protected let b = Baz; -b = Foo; // error Foo is public -b = Bar; // error Baz is public +b = Foo; +b = Bar; b = Qux; // error Qux is private // c is private let c = Qux; -c = Foo; // error Foo is public -c = Bar; // error Bar is public -c = Baz; // error Baz is protected \ No newline at end of file +c = Foo; +c = Bar; +c = Baz; \ No newline at end of file