Files
babel/test/fixtures/transformation/esnext-es6-computed-properties/nested.js
Sebastian McKenzie cb54c11d84 add esnext tests
2015-01-04 07:39:11 +11:00

5 lines
132 B
JavaScript

var x = 'y';
var foo = {[x]: 10, z: {[x]: 10}};
assert.equal(foo.y + foo.z.y, 20);
assert.equal({[x]: {[x]: {[x]: 10}}}.y.y.y, 10);