2014-07-13 01:04:16 +02:00
|
|
|
//// [wrappedAndRecursiveConstraints2.ts]
|
|
|
|
class C<T extends C<T>> { // error
|
|
|
|
constructor(x: T) { }
|
|
|
|
}
|
|
|
|
|
|
|
|
var c = new C(1);
|
|
|
|
var c = new C(new C('')); // error
|
|
|
|
|
|
|
|
//// [wrappedAndRecursiveConstraints2.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C(x) {
|
|
|
|
}
|
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
var c = new C(1);
|
2014-08-15 23:32:08 +02:00
|
|
|
var c = new C(new C('')); // error
|