2014-07-13 01:04:16 +02:00
|
|
|
//// [thisInArrowFunctionInStaticInitializer1.ts]
|
|
|
|
function log(a) { }
|
|
|
|
|
|
|
|
class Vector {
|
|
|
|
static foo = () => {
|
|
|
|
// 'this' should not be available in a static initializer.
|
|
|
|
log(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [thisInArrowFunctionInStaticInitializer1.js]
|
2015-02-07 03:45:09 +01:00
|
|
|
function log(a) { }
|
2014-07-13 01:04:16 +02:00
|
|
|
var Vector = (function () {
|
|
|
|
function Vector() {
|
|
|
|
var _this = this;
|
|
|
|
}
|
|
|
|
Vector.foo = function () {
|
2014-08-16 00:49:09 +02:00
|
|
|
// 'this' should not be available in a static initializer.
|
2014-07-13 01:04:16 +02:00
|
|
|
log(_this);
|
|
|
|
};
|
|
|
|
return Vector;
|
|
|
|
})();
|