TypeScript/tests/cases/compiler/invalidConstraint1.ts

6 lines
112 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function f<T, U extends { a: T }>() {
return undefined;
}
f<string, { a: number }>(); // should error