TypeScript/tests/baselines/reference/typeParameterHasSelfAsConstraint.errors.txt
2014-07-12 17:30:19 -07:00

10 lines
368 B
Plaintext

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