mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-04 13:44:29 +01:00 
			
		
		
		
	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.
		
			
				
	
	
		
			15 lines
		
	
	
		
			435 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			435 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// 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 LeftHandSideExpression is neither an
 | 
						|
    ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
 | 
						|
    LeftHandSideExpression is false.
 | 
						|
es6id: 12.14.1
 | 
						|
description: Assignment with non-simple target
 | 
						|
negative: ReferenceError
 | 
						|
---*/
 | 
						|
 | 
						|
1 = 1;
 |