class properties with an undefined value are now correctly writable

This commit is contained in:
Jay Phelps
2015-04-13 20:46:33 -07:00
parent 64f5480f96
commit 6ca565d7fb
6 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
class Foo {
bar;
}

View File

@@ -0,0 +1,14 @@
"use strict";
var Foo = (function () {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
babelHelpers.createClass(Foo, [{
key: "bar",
value: undefined,
enumerable: true
}]);
return Foo;
})();

View File

@@ -0,0 +1,3 @@
class Foo {
static bar;
}

View File

@@ -0,0 +1,6 @@
class Foo {
static num;
}
assert.equal("num" in Foo, true);
assert.equal(Foo.num, undefined);

View File

@@ -0,0 +1,14 @@
"use strict";
var Foo = (function () {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
}
babelHelpers.createClass(Foo, null, [{
key: "bar",
value: undefined,
enumerable: true
}]);
return Foo;
})();