| Index: test/mjsunit/es6/classes.js
|
| diff --git a/test/mjsunit/es6/classes.js b/test/mjsunit/es6/classes.js
|
| index fb77dbb8e4b01bb273512b215763dadbb1077661..6cdbe75a89c5cab629c854c985c350c41453a79d 100644
|
| --- a/test/mjsunit/es6/classes.js
|
| +++ b/test/mjsunit/es6/classes.js
|
| @@ -1046,3 +1046,40 @@ function testClassRestrictedProperties(C) {
|
| assertEquals(42, usingYieldInExtends());
|
|
|
| })();
|
| +
|
| +(function TestEvaluationOrder() {
|
| + var effects = [];
|
| +
|
| + (class extends (effects.push(0), function(){ assertUnreachable(); }) {
|
| + [(effects.push(1), { toString(){ effects.push(2); } })](){}
|
| + static [(effects.push(3), { toString(){ effects.push(4); } })](){}
|
| + [(effects.push(5), { toString(){ effects.push(6); } })](){}
|
| + static [(effects.push(7), { toString(){ effects.push(8); } })](){}
|
| + });
|
| + assertArrayEquals([0, 1, 2, 3, 4, 5, 6, 7, 8], effects);
|
| +})();
|
| +
|
| +(function TestComputedPropertyNamedConstructor() {
|
| + const constructor_sigil = {};
|
| + const nonconstructor_sigil = {};
|
| +
|
| + class DefaultConstructor {
|
| + ["constructor"](){ return nonconstructor_sigil; }
|
| + }
|
| + assertInstanceof(new DefaultConstructor, DefaultConstructor);
|
| + assertEquals((new DefaultConstructor).constructor(), nonconstructor_sigil);
|
| +
|
| + class PreceedingConstructor {
|
| + constructor(){ return constructor_sigil; }
|
| + ["constructor"](){ return nonconstructor_sigil; }
|
| + }
|
| + assertEquals(new PreceedingConstructor, constructor_sigil);
|
| + assertEquals((new PreceedingConstructor).constructor(), nonconstructor_sigil);
|
| +
|
| + class FollowingConstructor {
|
| + ["constructor"](){ return nonconstructor_sigil; }
|
| + constructor(){ return constructor_sigil; }
|
| + }
|
| + assertEquals(new FollowingConstructor, constructor_sigil);
|
| + assertEquals((new FollowingConstructor).constructor(), nonconstructor_sigil);
|
| +})();
|
|
|