114 lines
6.2 KiB
Text
114 lines
6.2 KiB
Text
=== tests/cases/compiler/genericsAndHigherOrderFunctions.ts ===
|
|
// no errors expected
|
|
|
|
var combine: <T, S>(f: (_: T) => S) =>
|
|
>combine : Symbol(combine, Decl(genericsAndHigherOrderFunctions.ts, 2, 3))
|
|
>T : Symbol(T, Decl(genericsAndHigherOrderFunctions.ts, 2, 14))
|
|
>S : Symbol(S, Decl(genericsAndHigherOrderFunctions.ts, 2, 16))
|
|
>f : Symbol(f, Decl(genericsAndHigherOrderFunctions.ts, 2, 20))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 2, 24))
|
|
>T : Symbol(T, Decl(genericsAndHigherOrderFunctions.ts, 2, 14))
|
|
>S : Symbol(S, Decl(genericsAndHigherOrderFunctions.ts, 2, 16))
|
|
|
|
<U>(g: (_: U) => T) =>
|
|
>U : Symbol(U, Decl(genericsAndHigherOrderFunctions.ts, 3, 5))
|
|
>g : Symbol(g, Decl(genericsAndHigherOrderFunctions.ts, 3, 8))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 3, 12))
|
|
>U : Symbol(U, Decl(genericsAndHigherOrderFunctions.ts, 3, 5))
|
|
>T : Symbol(T, Decl(genericsAndHigherOrderFunctions.ts, 2, 14))
|
|
|
|
(x: U) => S
|
|
>x : Symbol(x, Decl(genericsAndHigherOrderFunctions.ts, 4, 5))
|
|
>U : Symbol(U, Decl(genericsAndHigherOrderFunctions.ts, 3, 5))
|
|
>S : Symbol(S, Decl(genericsAndHigherOrderFunctions.ts, 2, 16))
|
|
|
|
= <T, S>(f: (_: T) => S) =>
|
|
>T : Symbol(T, Decl(genericsAndHigherOrderFunctions.ts, 6, 7))
|
|
>S : Symbol(S, Decl(genericsAndHigherOrderFunctions.ts, 6, 9))
|
|
>f : Symbol(f, Decl(genericsAndHigherOrderFunctions.ts, 6, 13))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 6, 17))
|
|
>T : Symbol(T, Decl(genericsAndHigherOrderFunctions.ts, 6, 7))
|
|
>S : Symbol(S, Decl(genericsAndHigherOrderFunctions.ts, 6, 9))
|
|
|
|
<U>(g: (_: U) => T) =>
|
|
>U : Symbol(U, Decl(genericsAndHigherOrderFunctions.ts, 7, 9))
|
|
>g : Symbol(g, Decl(genericsAndHigherOrderFunctions.ts, 7, 12))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 7, 16))
|
|
>U : Symbol(U, Decl(genericsAndHigherOrderFunctions.ts, 7, 9))
|
|
>T : Symbol(T, Decl(genericsAndHigherOrderFunctions.ts, 6, 7))
|
|
|
|
(x: U) => f(g(x))
|
|
>x : Symbol(x, Decl(genericsAndHigherOrderFunctions.ts, 8, 13))
|
|
>U : Symbol(U, Decl(genericsAndHigherOrderFunctions.ts, 7, 9))
|
|
>f : Symbol(f, Decl(genericsAndHigherOrderFunctions.ts, 6, 13))
|
|
>g : Symbol(g, Decl(genericsAndHigherOrderFunctions.ts, 7, 12))
|
|
>x : Symbol(x, Decl(genericsAndHigherOrderFunctions.ts, 8, 13))
|
|
|
|
var foo: <K, N>(g: (x: K) => N) =>
|
|
>foo : Symbol(foo, Decl(genericsAndHigherOrderFunctions.ts, 10, 3))
|
|
>K : Symbol(K, Decl(genericsAndHigherOrderFunctions.ts, 10, 10))
|
|
>N : Symbol(N, Decl(genericsAndHigherOrderFunctions.ts, 10, 12))
|
|
>g : Symbol(g, Decl(genericsAndHigherOrderFunctions.ts, 10, 16))
|
|
>x : Symbol(x, Decl(genericsAndHigherOrderFunctions.ts, 10, 20))
|
|
>K : Symbol(K, Decl(genericsAndHigherOrderFunctions.ts, 10, 10))
|
|
>N : Symbol(N, Decl(genericsAndHigherOrderFunctions.ts, 10, 12))
|
|
|
|
(h: <M>(_: (_: K) => (_: M) => M) => (_: M) => M) =>
|
|
>h : Symbol(h, Decl(genericsAndHigherOrderFunctions.ts, 11, 5))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 11, 9))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 11, 12))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 11, 16))
|
|
>K : Symbol(K, Decl(genericsAndHigherOrderFunctions.ts, 10, 10))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 11, 26))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 11, 9))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 11, 9))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 11, 42))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 11, 9))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 11, 9))
|
|
|
|
<R>(f: (_: N) => (_: R) => R) => (_: R) => R
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 12, 5))
|
|
>f : Symbol(f, Decl(genericsAndHigherOrderFunctions.ts, 12, 8))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 12, 12))
|
|
>N : Symbol(N, Decl(genericsAndHigherOrderFunctions.ts, 10, 12))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 12, 22))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 12, 5))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 12, 5))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 12, 38))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 12, 5))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 12, 5))
|
|
|
|
= <K, N>(g: (x: K) => N) =>
|
|
>K : Symbol(K, Decl(genericsAndHigherOrderFunctions.ts, 14, 7))
|
|
>N : Symbol(N, Decl(genericsAndHigherOrderFunctions.ts, 14, 9))
|
|
>g : Symbol(g, Decl(genericsAndHigherOrderFunctions.ts, 14, 13))
|
|
>x : Symbol(x, Decl(genericsAndHigherOrderFunctions.ts, 14, 17))
|
|
>K : Symbol(K, Decl(genericsAndHigherOrderFunctions.ts, 14, 7))
|
|
>N : Symbol(N, Decl(genericsAndHigherOrderFunctions.ts, 14, 9))
|
|
|
|
(h: <M>(_: (_: K) => (_: M) => M) => (_: M) => M) =>
|
|
>h : Symbol(h, Decl(genericsAndHigherOrderFunctions.ts, 15, 9))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 15, 13))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 15, 16))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 15, 20))
|
|
>K : Symbol(K, Decl(genericsAndHigherOrderFunctions.ts, 14, 7))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 15, 30))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 15, 13))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 15, 13))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 15, 46))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 15, 13))
|
|
>M : Symbol(M, Decl(genericsAndHigherOrderFunctions.ts, 15, 13))
|
|
|
|
<R>(f: (_: N) => (_: R) => R) => h(combine(f)(g))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 16, 13))
|
|
>f : Symbol(f, Decl(genericsAndHigherOrderFunctions.ts, 16, 16))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 16, 20))
|
|
>N : Symbol(N, Decl(genericsAndHigherOrderFunctions.ts, 14, 9))
|
|
>_ : Symbol(_, Decl(genericsAndHigherOrderFunctions.ts, 16, 30))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 16, 13))
|
|
>R : Symbol(R, Decl(genericsAndHigherOrderFunctions.ts, 16, 13))
|
|
>h : Symbol(h, Decl(genericsAndHigherOrderFunctions.ts, 15, 9))
|
|
>combine : Symbol(combine, Decl(genericsAndHigherOrderFunctions.ts, 2, 3))
|
|
>f : Symbol(f, Decl(genericsAndHigherOrderFunctions.ts, 16, 16))
|
|
>g : Symbol(g, Decl(genericsAndHigherOrderFunctions.ts, 14, 13))
|
|
|