| 1 |
// Copyright (C) 2014 André Bargull. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: Assignment Operator calls PutValue(lref, rval) |
| 6 |
es5id: S11.13.1_A5_T5 |
| 7 |
description: > |
| 8 |
Evaluating LeftHandSideExpression lref returns Reference type; Reference |
| 9 |
base value is an environment record and environment record kind is |
| 10 |
object environment record. PutValue(lref, rval) uses the initially |
| 11 |
created Reference even if the environment binding is no longer present. |
| 12 |
No ReferenceError is thrown when assignment is in strict-mode code and the |
| 13 |
original binding is no longer present. |
| 14 |
---*/ |
| 15 |
|
| 16 |
var global = this; |
| 17 |
Object.defineProperty(this, "x", { |
| 18 |
configurable: true, |
| 19 |
value: 1 |
| 20 |
}); |
| 21 |
|
| 22 |
(function() { |
| 23 |
"use strict"; |
| 24 |
x = (delete global.x, 2); |
| 25 |
})(); |
| 26 |
|
| 27 |
if (this.x !== 2) { |
| 28 |
$ERROR('#1: this.x === 2. Actual: ' + (this.x)); |
| 29 |
} |