TypeScript/tests/cases/compiler/constraintPropagationThroughReturnTypes.ts

9 lines
118 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function g<T>(x: T): T {
return x;
}
function f<S extends { foo: string }>(x: S) {
var y = g(x);
y;
}