mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			401 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			401 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Reviewed
 | |
| function foo() {
 | |
|     return {
 | |
|         get: function () { },
 | |
|         set: Object,
 | |
|     };
 | |
| }
 | |
| 
 | |
| var exception;
 | |
| try {
 | |
|     Object.defineProperties({}, {
 | |
|         2: foo(),
 | |
|         0: foo(),
 | |
|         1: foo(),
 | |
|         ' ': foo(),
 | |
|         9: foo(),
 | |
|         B: 'B',
 | |
|     });
 | |
| } catch (e) {
 | |
|     exception = e;
 | |
| }
 | |
| 
 | |
| if (exception != "TypeError: Property description must be an object.")
 | |
|     throw "FAILED";
 |