blob: 30056f06b5944091a12e34409d75058f20cd53b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (C) 2014 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Assignment Operator calls PutValue(lref, rval)
es5id: S11.13.1_A6_T1
description: >
Evaluating LeftHandSideExpression lref returns Reference type; Reference
base value is an environment record and environment record kind is
declarative environment record. PutValue(lref, rval) uses the initially
created Reference even if a more local binding is available.
flags: [noStrict]
---*/
function testAssignment() {
var x = 0;
var innerX = (function() {
x = (eval("var x;"), 1);
return x;
})();
if (innerX !== undefined) {
throw new Test262Error('#1: innerX === undefined. Actual: ' + (innerX));
}
if (x !== 1) {
throw new Test262Error('#2: x === 1. Actual: ' + (x));
}
}
testAssignment();
reportCompare(0, 0);
|