mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-04 13:44:29 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			721 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			721 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// Copyright (c) 2012 Ecma International.  All rights reserved.
 | 
						|
// This code is governed by the BSD license found in the LICENSE file.
 | 
						|
 | 
						|
/*---
 | 
						|
esid: sec-assignment-operators-static-semantics-early-errors
 | 
						|
es5id: 11.13.1-1-1
 | 
						|
description: >
 | 
						|
    simple assignment throws ReferenceError if LeftHandSide is not a
 | 
						|
    reference (number)
 | 
						|
info: |
 | 
						|
    AssignmentExpression : LeftHandSideExpression = AssignmentExpression
 | 
						|
 | 
						|
    It is an early Reference Error if LeftHandSideExpression is neither an
 | 
						|
    ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
 | 
						|
    LeftHandSideExpression is false.
 | 
						|
negative:
 | 
						|
  phase: early
 | 
						|
  type: ReferenceError
 | 
						|
---*/
 | 
						|
 | 
						|
throw "Test262: This statement should not be evaluated.";
 | 
						|
 | 
						|
42 = 42;
 |