2014-07-13 01:04:16 +02:00
|
|
|
//// [invalidConstraint1.ts]
|
|
|
|
function f<T, U extends { a: T }>() {
|
|
|
|
return undefined;
|
|
|
|
}
|
|
|
|
f<string, { a: number }>(); // should error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [invalidConstraint1.js]
|
|
|
|
function f() {
|
|
|
|
return undefined;
|
|
|
|
}
|
2014-08-16 00:49:09 +02:00
|
|
|
f(); // should error
|