TypeScript/tests/baselines/reference/privateStaticMemberAccessibility.js
2015-05-01 10:49:54 -07:00

32 lines
834 B
TypeScript

//// [privateStaticMemberAccessibility.ts]
class Base {
private static foo: string;
}
class Derived extends Base {
static bar = Base.foo; // error
bing = () => Base.foo; // error
}
//// [privateStaticMemberAccessibility.js]
var __extends = (this && 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 Base = (function () {
function Base() {
}
return Base;
})();
var Derived = (function (_super) {
__extends(Derived, _super);
function Derived() {
_super.apply(this, arguments);
this.bing = function () { return Base.foo; }; // error
}
Derived.bar = Base.foo; // error
return Derived;
})(Base);