2014-07-13 01:04:16 +02:00
|
|
|
//// [recursiveBaseConstructorCreation1.ts]
|
|
|
|
class C1 {
|
|
|
|
public func(param: C2): any { }
|
|
|
|
}
|
|
|
|
class C2 extends C1 { }
|
|
|
|
var x = new C2(); // Valid
|
|
|
|
|
|
|
|
|
|
|
|
//// [recursiveBaseConstructorCreation1.js]
|
|
|
|
var __extends = this.__extends || function (d, b) {
|
|
|
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
function __() { this.constructor = d; }
|
|
|
|
__.prototype = b.prototype;
|
|
|
|
d.prototype = new __();
|
|
|
|
};
|
|
|
|
var C1 = (function () {
|
|
|
|
function C1() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
C1.prototype.func = function (param) { };
|
2014-07-13 01:04:16 +02:00
|
|
|
return C1;
|
|
|
|
})();
|
|
|
|
var C2 = (function (_super) {
|
|
|
|
__extends(C2, _super);
|
|
|
|
function C2() {
|
|
|
|
_super.apply(this, arguments);
|
|
|
|
}
|
|
|
|
return C2;
|
|
|
|
})(C1);
|
2014-08-15 22:18:54 +02:00
|
|
|
var x = new C2(); // Valid
|