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

14 lines
479 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/recursiveIdenticalAssignment.ts (1 errors) ====
interface A<T> {
x: A<T>
}
interface B<T extends B<B<T>>> { // error, constraint referencing itself
~~~~~~~~~~~~~~~~~
!!! 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>>