9 lines
414 B
Plaintext
9 lines
414 B
Plaintext
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints2.ts (1 errors) ====
|
|
class C<T extends C<T>> { // error
|
|
~~~~~~~~~~~~~~
|
|
!!! error TS2313: 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 |