| 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: Compound Assignment Operator calls PutValue(lref, v) |
| 6 |
es5id: S11.13.2_A5.5_T4 |
| 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, v) uses the initially |
| 11 |
created Reference even if the environment binding is no longer present. |
| 12 |
No ReferenceError is thrown when 'x -= y' is in strict-mode code and the |
| 13 |
original binding is no longer present. |
| 14 |
Check operator is "x -= y". |
| 15 |
flags: [noStrict] |
| 16 |
---*/ |
| 17 |
|
| 18 |
var scope = { |
| 19 |
get x() { |
| 20 |
delete this.x; |
| 21 |
return 2; |
| 22 |
} |
| 23 |
}; |
| 24 |
|
| 25 |
with (scope) { |
| 26 |
(function() { |
| 27 |
"use strict"; |
| 28 |
x -= 1; |
| 29 |
})(); |
| 30 |
} |
| 31 |
|
| 32 |
if (scope.x !== 1) { |
| 33 |
$ERROR('#1: scope.x === 1. Actual: ' + (scope.x)); |
| 34 |
} |