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

6 lines
112 B
TypeScript

function f<T, U extends { a: T }>() {
return undefined;
}
f<string, { a: number }>(); // should error