TypeScript/tests/baselines/reference/invalidConstraint1.errors.txt

9 lines
346 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/invalidConstraint1.ts (1 errors) ====
function f<T, U extends { a: T }>() {
~~~~~~~~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
f<string, { a: number }>(); // should error