53 lines
3.5 KiB
Text
53 lines
3.5 KiB
Text
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures3.ts ===
|
|
// some complex cases of assignment compat of generic signatures that stress contextual signature instantiation
|
|
|
|
interface I<T, S> {
|
|
>I : I<T, S>, Symbol(I,Decl(assignmentCompatWithGenericCallSignatures3.ts,0,0))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,2,12))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,2,14))
|
|
|
|
<U>(f: (x: T) => (y: S) => U): U
|
|
>U : U, Symbol(U,Decl(assignmentCompatWithGenericCallSignatures3.ts,3,5))
|
|
>f : (x: T) => (y: S) => U, Symbol(f,Decl(assignmentCompatWithGenericCallSignatures3.ts,3,8))
|
|
>x : T, Symbol(x,Decl(assignmentCompatWithGenericCallSignatures3.ts,3,12))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,2,12))
|
|
>y : S, Symbol(y,Decl(assignmentCompatWithGenericCallSignatures3.ts,3,22))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,2,14))
|
|
>U : U, Symbol(U,Decl(assignmentCompatWithGenericCallSignatures3.ts,3,5))
|
|
>U : U, Symbol(U,Decl(assignmentCompatWithGenericCallSignatures3.ts,3,5))
|
|
}
|
|
|
|
var g: <T>(x: T) => <S>(y: S) => I<T, S>
|
|
>g : <T>(x: T) => <S>(y: S) => I<T, S>, Symbol(g,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,3))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,8))
|
|
>x : T, Symbol(x,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,11))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,8))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,21))
|
|
>y : S, Symbol(y,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,24))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,21))
|
|
>I : I<T, S>, Symbol(I,Decl(assignmentCompatWithGenericCallSignatures3.ts,0,0))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,8))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,21))
|
|
|
|
var h: <T>(x: T) => <S>(y: S) => { <U>(f: (x: T) => (y: S) => U): U }
|
|
>h : <T>(x: T) => <S>(y: S) => <U>(f: (x: T) => (y: S) => U) => U, Symbol(h,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,3))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,8))
|
|
>x : T, Symbol(x,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,11))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,8))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,21))
|
|
>y : S, Symbol(y,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,24))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,21))
|
|
>U : U, Symbol(U,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,36))
|
|
>f : (x: T) => (y: S) => U, Symbol(f,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,39))
|
|
>x : T, Symbol(x,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,43))
|
|
>T : T, Symbol(T,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,8))
|
|
>y : S, Symbol(y,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,53))
|
|
>S : S, Symbol(S,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,21))
|
|
>U : U, Symbol(U,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,36))
|
|
>U : U, Symbol(U,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,36))
|
|
|
|
g = h // ok
|
|
>g = h : <T>(x: T) => <S>(y: S) => <U>(f: (x: T) => (y: S) => U) => U
|
|
>g : <T>(x: T) => <S>(y: S) => I<T, S>, Symbol(g,Decl(assignmentCompatWithGenericCallSignatures3.ts,6,3))
|
|
>h : <T>(x: T) => <S>(y: S) => <U>(f: (x: T) => (y: S) => U) => U, Symbol(h,Decl(assignmentCompatWithGenericCallSignatures3.ts,7,3))
|
|
|