TypeScript/tests/cases/compiler/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.ts
2014-07-12 17:30:19 -07:00

6 lines
259 B
TypeScript

function f<T>() {
function g<U extends T>(u: U): U { return null }
return g;
}
var h: <V, W>(v: V, func: (v: V) => W) => W;
var x = h("", f<string>()); // Call should succeed and x should be string. All type parameters should be instantiated to string