swc/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.ts

6 lines
116 B
TypeScript

class C<T extends C<T>> { // error
constructor(x: T) { }
}
var c = new C(1);
var c = new C(new C('')); // error