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

10 lines
433 B
Plaintext

==== tests/cases/compiler/typeParameterAssignmentWithConstraints.ts (2 errors) ====
function f<A, B extends A>() {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
var a: A;
var b: B;
a = b; // Error: Can't convert B to A
~
!!! error TS2323: Type 'B' is not assignable to type 'A'.
}