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

9 lines
400 B
Plaintext

==== tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.ts (1 errors) ====
class C<T extends C<T>> { // error
~~~~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
constructor(x: T) { }
}
var c = new C(1);
var c = new C(new C('')); // error