-
Mike Pennisi authored
In ECMAScript 5, assignment to a non-reference value throws a runtime ReferenceError. ECMAscript 6 specifies an early ReferenceError in these cases. Tests for this behavior have been authored to pass in both cases. Simplify these tests to describe and assert the early error.
Mike Pennisi authoredIn ECMAScript 5, assignment to a non-reference value throws a runtime ReferenceError. ECMAscript 6 specifies an early ReferenceError in these cases. Tests for this behavior have been authored to pass in both cases. Simplify these tests to describe and assert the early error.
left-shift-non-simple.js 380 B
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
It is an early Reference Error if IsValidSimpleAssignmentTarget of
LeftHandSideExpression is false.
es6id: 12.14.1
description: Compound "left shift" assignment with non-simple target
negative: ReferenceError
---*/
1 <<= 1;