53 lines
1 KiB
Text
53 lines
1 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>
|
|
>T : T
|
|
>S : S
|
|
|
|
<U>(f: (x: T) => (y: S) => U): U
|
|
>U : U
|
|
>f : (x: T) => (y: S) => U
|
|
>x : T
|
|
>T : T
|
|
>y : S
|
|
>S : S
|
|
>U : U
|
|
>U : U
|
|
}
|
|
|
|
var g: <T>(x: T) => <S>(y: S) => I<T, S>
|
|
>g : <T>(x: T) => <S>(y: S) => I<T, S>
|
|
>T : T
|
|
>x : T
|
|
>T : T
|
|
>S : S
|
|
>y : S
|
|
>S : S
|
|
>I : I<T, S>
|
|
>T : T
|
|
>S : S
|
|
|
|
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
|
|
>T : T
|
|
>x : T
|
|
>T : T
|
|
>S : S
|
|
>y : S
|
|
>S : S
|
|
>U : U
|
|
>f : (x: T) => (y: S) => U
|
|
>x : T
|
|
>T : T
|
|
>y : S
|
|
>S : S
|
|
>U : U
|
|
>U : U
|
|
|
|
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>
|
|
>h : <T>(x: T) => <S>(y: S) => <U>(f: (x: T) => (y: S) => U) => U
|
|
|