babel/test/fixtures/esnext/es6-classes/static-getter.js
2015-01-05 10:18:42 +11:00

12 lines
179 B
JavaScript

class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
static get ORIGIN() {
return new this(0, 0);
}
}
assert.deepEqual(Point.ORIGIN, new Point(0, 0));