mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 05:29:11 -06:00
Accept new baselines
This commit is contained in:
parent
ff83327f30
commit
bc3689fa00
@ -45,7 +45,5 @@ g("", x => null, x => x.toLowerCase());
|
||||
>g : Symbol(g, Decl(fixingTypeParametersRepeatedly1.ts, 1, 39), Decl(fixingTypeParametersRepeatedly1.ts, 4, 63))
|
||||
>x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 6, 5))
|
||||
>x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 6, 16))
|
||||
>x.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --))
|
||||
>x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 6, 16))
|
||||
>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@ -48,16 +48,16 @@ declare function g();
|
||||
>g : { <T>(x: T, y: (p: T) => T, z: (p: T) => T): T; (): any; }
|
||||
|
||||
g("", x => null, x => x.toLowerCase());
|
||||
>g("", x => null, x => x.toLowerCase()) : string
|
||||
>g("", x => null, x => x.toLowerCase()) : any
|
||||
>g : { <T>(x: T, y: (p: T) => T, z: (p: T) => T): T; (): any; }
|
||||
>"" : ""
|
||||
>x => null : (x: string) => any
|
||||
>x : string
|
||||
>null : null
|
||||
>x => x.toLowerCase() : (x: string) => string
|
||||
>x : string
|
||||
>x.toLowerCase() : string
|
||||
>x.toLowerCase : () => string
|
||||
>x : string
|
||||
>toLowerCase : () => string
|
||||
>x => x.toLowerCase() : (x: any) => any
|
||||
>x : any
|
||||
>x.toLowerCase() : any
|
||||
>x.toLowerCase : any
|
||||
>x : any
|
||||
>toLowerCase : any
|
||||
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(11,27): error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
Property 'toBase' is missing in type 'Base'.
|
||||
tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(17,27): error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
Type 'Base' is not assignable to type 'Derived'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/fixingTypeParametersRepeatedly2.ts (2 errors) ====
|
||||
==== tests/cases/compiler/fixingTypeParametersRepeatedly2.ts (1 errors) ====
|
||||
interface Base {
|
||||
baseProp;
|
||||
}
|
||||
@ -26,7 +24,4 @@ tests/cases/compiler/fixingTypeParametersRepeatedly2.ts(17,27): error TS2345: Ar
|
||||
// The same error should be observed in both cases.
|
||||
declare function bar<T>(x: T, func: (p: T) => T): T;
|
||||
declare function bar<T>(x: T, func: (p: T) => T): T;
|
||||
var result = bar(derived, d => d.toBase());
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '(d: Derived) => Base' is not assignable to parameter of type '(p: Derived) => Derived'.
|
||||
!!! error TS2345: Type 'Base' is not assignable to type 'Derived'.
|
||||
var result = bar(derived, d => d.toBase());
|
||||
@ -66,8 +66,8 @@ declare function bar<T>(x: T, func: (p: T) => T): T;
|
||||
>T : T
|
||||
|
||||
var result2 = bar(derived, d => d.toBase());
|
||||
>result2 : Derived
|
||||
>bar(derived, d => d.toBase()) : Derived
|
||||
>result2 : Base
|
||||
>bar(derived, d => d.toBase()) : Base
|
||||
>bar : { <T>(x: T, func: (p: T) => T): T; <T>(x: T, func: (p: T) => T): T; }
|
||||
>derived : Derived
|
||||
>d => d.toBase() : (d: Derived) => Base
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user