TypeScript/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt
2014-09-11 16:11:08 -07:00

10 lines
396 B
Plaintext

==== tests/cases/compiler/typeParameterHasSelfAsConstraint.ts (2 errors) ====
function foo<T extends T>(x: T): number {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return x;
~
!!! error TS2323: Type 'T' is not assignable to type 'number'.
}