Accepting new baselines

This commit is contained in:
Anders Hejlsberg 2014-09-09 15:23:24 -07:00
parent 34c4b312f9
commit 2b58a239d1
2 changed files with 5 additions and 5 deletions

View File

@ -10,9 +10,9 @@
// more args not allowed
var r2 = foo({ cb: <T>(x: T, y: T) => '' }); // error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Argument of type '{ cb: <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: any) => string; }'.
!!! Argument of type '{ cb: <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'.
!!! Types of property 'cb' are incompatible:
!!! Type '<T>(x: T, y: T) => string' is not assignable to type '(t: any) => string'.
!!! Type '<T>(x: T, y: T) => string' is not assignable to type '(t: {}) => string'.
var r3 = foo({ cb: (x: string, y: number) => '' }); // error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'.

View File

@ -20,10 +20,10 @@ declare function identity<V>(y: V): V;
>V : V
var s = map("", () => { return { x: identity }; });
>s : any
>map("", () => { return { x: identity }; }) : any
>s : string
>map("", () => { return { x: identity }; }) : string
>map : <T, U>(x: T, f: () => { x: (s: T) => U; }) => U
>() => { return { x: identity }; } : () => { x: <V>(y: V) => V; }
>() => { return { x: identity }; } : () => { x: (y: string) => string; }
>{ x: identity } : { x: <V>(y: V) => V; }
>x : <V>(y: V) => V
>identity : <V>(y: V) => V