infer class name for classes that have static properties (#3589)

This commit is contained in:
Keyan Zhang
2016-07-22 06:50:03 -07:00
committed by Henry Zhu
parent a289dfbbab
commit 879f69f0fb
5 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
var Foo = class {
static num = 0;
}

View File

@@ -0,0 +1,7 @@
var Foo = class {
static num = 0;
}
assert.equal(Foo.num, 0);
assert.equal(Foo.num = 1, 1);
assert.equal(Foo.name, "Foo");

View File

@@ -0,0 +1,5 @@
var _class, _temp;
var Foo = (_temp = _class = function Foo() {
babelHelpers.classCallCheck(this, Foo);
}, _class.num = 0, _temp);