62 lines
1.4 KiB
Text
62 lines
1.4 KiB
Text
|
=== tests/cases/compiler/contextualSignatureInstantiation2.ts ===
|
||
|
// dot f g x = f(g(x))
|
||
|
var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S;
|
||
|
>dot : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S
|
||
|
>T : T
|
||
|
>S : S
|
||
|
>f : (_: T) => S
|
||
|
>_ : T
|
||
|
>T : T
|
||
|
>S : S
|
||
|
>U : U
|
||
|
>g : (_: U) => T
|
||
|
>_ : U
|
||
|
>U : U
|
||
|
>T : T
|
||
|
>_ : U
|
||
|
>U : U
|
||
|
>S : S
|
||
|
|
||
|
dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x));
|
||
|
>dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (r: U) => S
|
||
|
>dot : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S
|
||
|
><T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (r: U) => S
|
||
|
>T : T
|
||
|
>S : S
|
||
|
>f : (_: T) => S
|
||
|
>_ : T
|
||
|
>T : T
|
||
|
>S : S
|
||
|
><U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)) : <U>(g: (_: U) => T) => (r: U) => S
|
||
|
>U : U
|
||
|
>g : (_: U) => T
|
||
|
>_ : U
|
||
|
>U : U
|
||
|
>T : T
|
||
|
>r : U
|
||
|
>U : U
|
||
|
>S : S
|
||
|
>(x) => f(g(x)) : (x: U) => S
|
||
|
>x : U
|
||
|
>f(g(x)) : S
|
||
|
>f : (_: T) => S
|
||
|
>g(x) : T
|
||
|
>g : (_: U) => T
|
||
|
>x : U
|
||
|
|
||
|
var id: <T>(x:T) => T;
|
||
|
>id : <T>(x: T) => T
|
||
|
>T : T
|
||
|
>x : T
|
||
|
>T : T
|
||
|
>T : T
|
||
|
|
||
|
var r23 = dot(id)(id);
|
||
|
>r23 : (_: {}) => {}
|
||
|
>dot(id)(id) : (_: {}) => {}
|
||
|
>dot(id) : <U>(g: (_: U) => {}) => (_: U) => {}
|
||
|
>dot : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S
|
||
|
>id : <T>(x: T) => T
|
||
|
>id : <T>(x: T) => T
|
||
|
|