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

6 lines
177 B
TypeScript

function foo1<T extends U, U>(t: T, u: U) { }
foo1<string, number>('hm', 1); // no error
function foo2<T, U extends T>(t: T, u: U) { }
foo2<number, string>(1, 'hm'); // error