9 lines
400 B
Text
9 lines
400 B
Text
|
==== 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
|