From cd399fb49bf25c0c12a9734aedd5babb759829f4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 4 Sep 2018 19:26:00 -0700 Subject: [PATCH] Accepted baselines. --- ...ntextualTypeWithUnionTypeObjectLiteral.errors.txt | 12 ++++++------ .../errorsWithCallablesInUnions01.errors.txt | 8 ++++++-- .../functionExpressionContextualTyping2.errors.txt | 8 ++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt index e4ffa209e6f..fb44cb57da7 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt +++ b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.errors.txt @@ -22,9 +22,9 @@ tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts( Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts(58,5): error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '((a: string, b: number) => string) | ((a: string, b: number) => number)'. - Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => number'. - Type 'string | number' is not assignable to type 'number'. - Type 'string' is not assignable to type 'number'. + Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => string'. + Type 'string | number' is not assignable to type 'string'. + Type 'number' is not assignable to type 'string'. ==== tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts (6 errors) ==== @@ -116,8 +116,8 @@ tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts( commonMethodDifferentReturnType: (a, b) => strOrNumber, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '((a: string, b: number) => string) | ((a: string, b: number) => number)'. -!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => number'. -!!! error TS2322: Type 'string | number' is not assignable to type 'number'. -!!! error TS2322: Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(a: string, b: number) => string | number' is not assignable to type '(a: string, b: number) => string'. +!!! error TS2322: Type 'string | number' is not assignable to type 'string'. +!!! error TS2322: Type 'number' is not assignable to type 'string'. !!! related TS6500 tests/cases/conformance/types/union/contextualTypeWithUnionTypeObjectLiteral.ts:35:5: The expected type comes from property 'commonMethodDifferentReturnType' which is declared here on type 'I11 | I21' }; \ No newline at end of file diff --git a/tests/baselines/reference/errorsWithCallablesInUnions01.errors.txt b/tests/baselines/reference/errorsWithCallablesInUnions01.errors.txt index bf117e0c8b3..4881c4f7ff1 100644 --- a/tests/baselines/reference/errorsWithCallablesInUnions01.errors.txt +++ b/tests/baselines/reference/errorsWithCallablesInUnions01.errors.txt @@ -1,5 +1,7 @@ tests/cases/compiler/errorsWithCallablesInUnions01.ts(10,12): error TS2322: Type '(x: string) => void' is not assignable to type 'IDirectiveLinkFn | IDirectivePrePost'. - Type '(x: string) => void' has no properties in common with type 'IDirectivePrePost'. + Type '(x: string) => void' is not assignable to type 'IDirectiveLinkFn'. + Types of parameters 'x' and 'scope' are incompatible. + Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/errorsWithCallablesInUnions01.ts (1 errors) ==== @@ -15,5 +17,7 @@ tests/cases/compiler/errorsWithCallablesInUnions01.ts(10,12): error TS2322: Type export let blah: IDirectiveLinkFn | IDirectivePrePost = (x: string) => {} ~~~~ !!! error TS2322: Type '(x: string) => void' is not assignable to type 'IDirectiveLinkFn | IDirectivePrePost'. -!!! error TS2322: Type '(x: string) => void' has no properties in common with type 'IDirectivePrePost'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'IDirectiveLinkFn'. +!!! error TS2322: Types of parameters 'x' and 'scope' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionExpressionContextualTyping2.errors.txt b/tests/baselines/reference/functionExpressionContextualTyping2.errors.txt index 6a3a7998f09..d50e0c4b6d6 100644 --- a/tests/baselines/reference/functionExpressionContextualTyping2.errors.txt +++ b/tests/baselines/reference/functionExpressionContextualTyping2.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping2.ts(11,1): error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '((n: number, s: string) => number) | ((n: number, s: string) => string)'. - Type '(foo: number, bar: string) => boolean' is not assignable to type '(n: number, s: string) => string'. - Type 'boolean' is not assignable to type 'string'. + Type '(foo: number, bar: string) => boolean' is not assignable to type '(n: number, s: string) => number'. + Type 'boolean' is not assignable to type 'number'. ==== tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping2.ts (1 errors) ==== @@ -17,5 +17,5 @@ tests/cases/conformance/expressions/contextualTyping/functionExpressionContextua a1 = (foo, bar) => { return true; } // Error ~~ !!! error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '((n: number, s: string) => number) | ((n: number, s: string) => string)'. -!!! error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '(n: number, s: string) => string'. -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type '(foo: number, bar: string) => boolean' is not assignable to type '(n: number, s: string) => number'. +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file