TypeScript/tests/baselines/reference/invalidConstraint1.errors.txt
2014-09-12 13:35:07 -07:00

12 lines
531 B
Plaintext

tests/cases/compiler/invalidConstraint1.ts(1,15): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
==== tests/cases/compiler/invalidConstraint1.ts (1 errors) ====
function f<T, U extends { a: T }>() {
~~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
f<string, { a: number }>(); // should error