mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	Missing coverage encountered while implementing <https://github.com/tc39/ecma262/pull/3307> in SpiderMonkey. Ensure environment lookups are performed in the correct order: - keyed-destructuring-property-reference-target-evaluation-order-with-bindings.js Ensure `delete super[elem]` steps are correctly performed: - delete/super-property-topropertykey.js - delete/super-property-uninitialized-this.js Ensure ToPropertyKey for computed property names in object literals correctly performed: - object/computed-property-name-topropertykey-before-value-evaluation.js Ensure `GetSuperBase` is executed before `ToPropertKey`: - super/prop-expr-getsuperbase-before-topropertykey-* Ensure `GetThisBinding` is executed first: - super/prop-expr-uninitialized-this-*
		
			
				
	
	
		
			33 lines
		
	
	
		
			755 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			755 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Copyright (C) 2024 André Bargull. All rights reserved.
 | |
| // This code is governed by the BSD license found in the LICENSE file.
 | |
| 
 | |
| /*---
 | |
| esid: sec-delete-operator-runtime-semantics-evaluation
 | |
| description: >
 | |
|   ToPropertyKey not performed when deleting a super reference.
 | |
| info: |
 | |
|   13.5.1.2 Runtime Semantics: Evaluation
 | |
| 
 | |
|     UnaryExpression : delete UnaryExpression
 | |
| 
 | |
|     1. Let ref be ? Evaluation of UnaryExpression.
 | |
|     ...
 | |
|     4. If IsPropertyReference(ref) is true, then
 | |
|       ...
 | |
|       b. If IsSuperReference(ref) is true, throw a ReferenceError exception.
 | |
| ---*/
 | |
| 
 | |
| var key = {
 | |
|   toString() {
 | |
|     throw new Test262Error("ToPropertyKey performed");
 | |
|   }
 | |
| };
 | |
| 
 | |
| var obj = {
 | |
|   m() {
 | |
|     delete super[key];
 | |
|   }
 | |
| };
 | |
| 
 | |
| assert.throws(ReferenceError, () => obj.m());
 |