Files
rust_browser/tests/external/js262/test262/language/expressions/assignment/target-super-computed-reference.js
Zachary D. Rowitsch 2240f6c518 Expand Test262 coverage to 550 tests (Phase B)
Vendor 500 new real Test262 tests (total 550), relax curation filters for
now-supported features (arrow functions, classes, destructuring, spread/rest,
for-in/of, template literals, let/const, instanceof), add automated triage
script, and track pass rate as a CI metric. 190/550 pass (34.5%).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:20:22 -05:00

50 lines
1.1 KiB
JavaScript

// Copyright (C) 2024 Sony Interactive Entertainment Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-assignment-operators
description: Assignment Operator evaluates its operands from left to right
info: |
The left-hand side expression is evaluated before the right-hand side.
Left-hand side expression is MemberExpression: super[prop].
ToPropertyKey(prop) occurs after both sides are evaluated.
---*/
function DummyError() {}
assert.throws(DummyError, function() {
var prop = function() {
throw new DummyError();
};
var expr = function() {
throw new Test262Error("right-hand side expression evaluated");
};
class C extends class {} {
m() {
super[prop()] = expr();
}
}
(new C()).m();
});
assert.throws(DummyError, function() {
var prop = {
toString: function() {
throw new Test262Error("property key evaluated");
}
};
var expr = function() {
throw new DummyError();
};
class C extends class {} {
m() {
super[prop] = expr();
}
}
(new C()).m();
});