All checks were successful
ci / fast (linux) (push) Successful in 6m19s
Add function property support to the JS engine (fn.prop = val, fn.prop, fn.method()) enabling the Test262 assert harness pattern. Implement Test262 execution mode in the JS262 harness with simplified sta.js/assert.js shims. Vendor 50 real tc39/test262 tests via curation script (35 pass, 15 known_fail). Engine changes: - JsObject: add Debug impl and has() method for presence checks - JsFunction: add properties field (Rc-shared JsObject) - Interpreter: handle function property get/set/call/compound-assign/update with user-property-over-builtin precedence Harness changes: - Add Test262 variant to Js262Mode with relaxed manifest validation - Implement run_test262_case with harness prepending and error classification - Create sta.js (Test262Error shim) and assert.js (assert.sameValue etc.) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
853 B
JavaScript
29 lines
853 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-assignment-operators-static-semantics-early-errors
|
|
es6id: 12.14.1
|
|
es5id: 11.1.6_A3_T5
|
|
description: Applied to a "covered" IdentifierReference
|
|
info: |
|
|
AssignmentExpression : LeftHandSideExpression = AssignmentExpression
|
|
|
|
- It is an early Reference Error if LeftHandSideExpression is neither an
|
|
ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
|
|
LeftHandSideExpression is false.
|
|
|
|
Static Semantics: IsValidSimpleAssignmentTarget
|
|
|
|
IdentifierReference : Identifier
|
|
|
|
1. If this IdentifierReference is contained in strict mode code and
|
|
StringValue of Identifier is "eval" or "arguments", return false.
|
|
2. Return true.
|
|
---*/
|
|
|
|
var x;
|
|
|
|
(x) = 1;
|
|
|
|
assert.sameValue(x, 1);
|