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

9 lines
118 B
TypeScript

function g<T>(x: T): T {
return x;
}
function f<S extends { foo: string }>(x: S) {
var y = g(x);
y;
}