From 2ef36e8d54b3b86f03bdd0e2a6204206c69c5684 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 29 Jan 2015 21:22:56 -0800 Subject: [PATCH] Accepting new baselines --- ...ntextualTypingWithFixedTypeParameters1.errors.txt | 12 +++++------- .../reference/parenthesizedContexualTyping1.types | 10 +++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt index adfb1c68b7..251a3a1bde 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt @@ -1,7 +1,6 @@ tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(2,22): error TS2339: Property 'foo' does not exist on type 'string'. -tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. - Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,32): error TS2339: Property 'foo' does not exist on type 'T'. +tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,32): error TS2339: Property 'foo' does not exist on type 'string'. +tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,38): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. ==== tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts (3 errors) ==== @@ -10,8 +9,7 @@ tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,32): error TS ~~~ !!! error TS2339: Property 'foo' does not exist on type 'string'. var r9 = f10('', () => (a => a.foo), 1); // error - ~~~ -!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. -!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'T'. ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'T'. \ No newline at end of file +!!! error TS2339: Property 'foo' does not exist on type 'string'. + ~ +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/parenthesizedContexualTyping1.types b/tests/baselines/reference/parenthesizedContexualTyping1.types index 60020fd8eb..925347ed1b 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping1.types +++ b/tests/baselines/reference/parenthesizedContexualTyping1.types @@ -220,11 +220,11 @@ var l = fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x) >x => undefined : (x: number) => any >x : number >undefined : undefined ->((x => x)) : (x: number) => number ->(x => x) : (x: number) => number ->x => x : (x: number) => number ->x : number ->x : number +>((x => x)) : (x: any) => any +>(x => x) : (x: any) => any +>x => x : (x: any) => any +>x : any +>x : any var lambda1: (x: number) => number = x => x; >lambda1 : (x: number) => number