From 23bec868109178882d91960d54d9d5d7e725feb2 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 15 Sep 2015 16:45:51 -0700 Subject: [PATCH] Accepted baselines. --- ...CompatForSignaturesWithTypePredicates01.errors.txt | 9 +-------- ...CompatForSignaturesWithTypePredicates02.errors.txt | 11 ++--------- ...CompatForSignaturesWithTypePredicates03.errors.txt | 11 ++--------- ...CompatForSignaturesWithTypePredicates04.errors.txt | 9 +-------- .../overloadsWithTypePredicates03.errors.txt | 11 +---------- 5 files changed, 7 insertions(+), 44 deletions(-) diff --git a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates01.errors.txt b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates01.errors.txt index 035fbc36c14..46fef875854 100644 --- a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates01.errors.txt +++ b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates01.errors.txt @@ -1,12 +1,9 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts(21,1): error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'. - Type predicate 'x is B' is not assignable to 'x is A'. - Type 'B' is not assignable to type 'A'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts(22,1): error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'. Type predicate 'x is A' is not assignable to 'x is B'. Type 'A' is not assignable to type 'B'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts (2 errors) ==== +==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates01.ts (1 errors) ==== class A { private a; @@ -28,10 +25,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme let myIsB = isB; myIsA = myIsB; - ~~~~~ -!!! error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'. -!!! error TS2322: Type predicate 'x is B' is not assignable to 'x is A'. -!!! error TS2322: Type 'B' is not assignable to type 'A'. myIsB = myIsA; ~~~~~ !!! error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'. diff --git a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates02.errors.txt b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates02.errors.txt index 8079be20a71..d63d935ab79 100644 --- a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates02.errors.txt +++ b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates02.errors.txt @@ -2,12 +2,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts(17,1): error TS2322: Type '(x: any) => x is any' is not assignable to type '(x: any) => x is A'. Type predicate 'x is any' is not assignable to 'x is A'. Type 'any' is not assignable to type 'A'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts(18,1): error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is any'. - Type predicate 'x is A' is not assignable to 'x is any'. - Type 'A' is not assignable to type 'any'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts (3 errors) ==== +==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates02.ts (2 errors) ==== class A { private a; @@ -31,8 +28,4 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: any) => x is any' is not assignable to type '(x: any) => x is A'. !!! error TS2322: Type predicate 'x is any' is not assignable to 'x is A'. !!! error TS2322: Type 'any' is not assignable to type 'A'. - myIsAny = myIsA; - ~~~~~~~ -!!! error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is any'. -!!! error TS2322: Type predicate 'x is A' is not assignable to 'x is any'. -!!! error TS2322: Type 'A' is not assignable to type 'any'. \ No newline at end of file + myIsAny = myIsA; \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates03.errors.txt b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates03.errors.txt index bfb94ff40d5..a96a529db59 100644 --- a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates03.errors.txt +++ b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates03.errors.txt @@ -1,12 +1,9 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts(20,1): error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'. Type predicate 'x is B' is not assignable to 'x is A'. Type 'B' is not assignable to type 'A'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts(21,1): error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'. - Type predicate 'x is A' is not assignable to 'x is B'. - Type 'A' is not assignable to type 'B'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts (2 errors) ==== +==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates03.ts (1 errors) ==== interface A { a?; @@ -31,8 +28,4 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type '(x: any) => x is B' is not assignable to type '(x: any) => x is A'. !!! error TS2322: Type predicate 'x is B' is not assignable to 'x is A'. !!! error TS2322: Type 'B' is not assignable to type 'A'. - myIsAny = myIsA; - ~~~~~~~ -!!! error TS2322: Type '(x: any) => x is A' is not assignable to type '(x: any) => x is B'. -!!! error TS2322: Type predicate 'x is A' is not assignable to 'x is B'. -!!! error TS2322: Type 'A' is not assignable to type 'B'. \ No newline at end of file + myIsAny = myIsA; \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates04.errors.txt b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates04.errors.txt index 16abe2efeaf..37241d2781d 100644 --- a/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates04.errors.txt +++ b/tests/baselines/reference/assignmentCompatForSignaturesWithTypePredicates04.errors.txt @@ -1,12 +1,9 @@ -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts(25,1): error TS2322: Type '(x: any) => x is E' is not assignable to type '(x: any) => x is number'. - Type predicate 'x is E' is not assignable to 'x is number'. - Type 'E' is not assignable to type 'number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts(26,1): error TS2322: Type '(x: any) => x is number' is not assignable to type '(x: any) => x is E'. Type predicate 'x is number' is not assignable to 'x is E'. Type 'number' is not assignable to type 'E'. -==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts (2 errors) ==== +==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatForSignaturesWithTypePredicates04.ts (1 errors) ==== enum E { A = 1, @@ -32,10 +29,6 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme let myIsB = isB; myIsA = myIsB; - ~~~~~ -!!! error TS2322: Type '(x: any) => x is E' is not assignable to type '(x: any) => x is number'. -!!! error TS2322: Type predicate 'x is E' is not assignable to 'x is number'. -!!! error TS2322: Type 'E' is not assignable to type 'number'. myIsB = myIsA; ~~~~~ !!! error TS2322: Type '(x: any) => x is number' is not assignable to type '(x: any) => x is E'. diff --git a/tests/baselines/reference/overloadsWithTypePredicates03.errors.txt b/tests/baselines/reference/overloadsWithTypePredicates03.errors.txt index 7ff18070aaf..5938a107e04 100644 --- a/tests/baselines/reference/overloadsWithTypePredicates03.errors.txt +++ b/tests/baselines/reference/overloadsWithTypePredicates03.errors.txt @@ -1,20 +1,11 @@ -tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(2,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(3,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. -tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(4,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature. tests/cases/conformance/functions/overloadsWithTypePredicates03.ts(5,10): error TS2394: Overload signature is not compatible with function implementation. -==== tests/cases/conformance/functions/overloadsWithTypePredicates03.ts (4 errors) ==== +==== tests/cases/conformance/functions/overloadsWithTypePredicates03.ts (1 errors) ==== function is(x: any, type: "number"): x is number; - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function is(x: any, type: "string"): x is string; - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function is(x: any, type: "boolean"): x is boolean; - ~~ -!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function is(x: any, type: string): x is (number | boolean | string); ~~ !!! error TS2394: Overload signature is not compatible with function implementation.