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

17 lines
674 B
Plaintext

tests/cases/compiler/recursiveIdenticalAssignment.ts(5,13): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
==== tests/cases/compiler/recursiveIdenticalAssignment.ts (1 errors) ====
interface A<T> {
x: A<T>
}
interface B<T extends B<B<T>>> { // error, constraint referencing itself
~~~~~~~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
x: B<T>
}
var a: A<A<any>>
var b: B<B<any>> = a // Error, any does not satisfy constraint B<B<T>>